先贴上错误提示
[root@bogon php.d]# php -v
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: php_sockets_le_socket), /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 7.2.9 (cli) (built: Aug 25 2018 14:12:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
使用源码包安出错后又使用
pecl install swoole
仍然相同错误提示,在官方文档没有查到解释,后来测试发现是插件加载顺序的原因,应该把extension=swoole.so加到socket的加载后面,在php7.2中进入/etc/php.d下,在sockets.ini中将extension=swoole.so加到extension=sockets.so下面,后重启php-fpm
更多推荐
centos环境安装swoole后,php7无法加载swoole.so时出现nable to load dynamic library 'swoole
发布评论