PHP Warning: PHP Startup: Unable to load dynamic library ‘swoole.so‘
Posted eyes++
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Warning: PHP Startup: Unable to load dynamic library ‘swoole.so‘相关的知识,希望对你有一定的参考价值。
完整报错为:
php Warning: PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /usr/lib64/php/modules/swoole.so (/usr/lib64/php/modules/swoole.so: undefined symbol: curl_ce), /usr/lib64/php/modules/swoole.so.so (/usr/lib64/php/modules/swoole.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
在php.ini中配置扩展会优先于php.d目录下配置文件加载,而swoole扩展依赖curl和socket扩展,因此需要在其后加载,因此不能在php.ini中添加extension=swoole.so
,而是在php.d目录中添加,指令如下,注意php.d目录视自身情况自行修改
echo 'extension=swoole.so' > /etc/php.d/20-swoole.ini
如果有兴趣了解更多内容,欢迎来我的个人网站看看:瞳孔的个人空间
以上是关于PHP Warning: PHP Startup: Unable to load dynamic library ‘swoole.so‘的主要内容,如果未能解决你的问题,请参考以下文章
PHP Warning: PHP Startup: Unable to load dynamic library ‘swoole.so‘
Warning: PHP Startup: Unable to load dynamic library
PHP启动:动态库加载失败(PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php