swoole 的php扩展安装
安装swoole 的php扩展有两种方式:
1.通过源码,自己进行编译安装
cd swoole-src-swoole-1.8.3-stable/ phpize ./configure --enable-async-mysql sudo make sudo make install
这种方式安装,注意当本地有多个php版本时,可能会出现一下错误:
PHP Warning: PHP Startup: swoole: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20131226
解决办法:
/usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --enable-async-mysql sudo make sudo make install
2.强烈推荐使用下面的方式安装:
pecl install swoole