- 执行 sudo pecl install swoole
Build process completed successfully Installing '/usr/lib/php/20160303/swoole.so' install ok: channel://pecl.php.net/swoole-1.9.20 configuration option "php_ini" is not set to php.ini location You should add "extension=swoole.so" to php.ini
- php.ini中 添加 extension=/usr/lib/php/20160303/swoole.so
- 注:需要在cli下的php.ini中加入,否则只会在phpinfo()能看到 php -m 却没有
Configuration File (php.ini) Path: /etc/php/7.1/cli Loaded Configuration File: /etc/php/7.1/cli/php.ini Scan for additional .ini files in: /etc/php/7.1/cli/conf.d Additional .ini files parsed: /etc/php/7.1/cli/conf.d/10-mysqlnd.ini,
- 在
Loaded Configuration File: /etc/php/7.1/cli/php.ini 中添加 然后重启
转载于:https://www.cnblogs.com/yin5th/p/7509341.html