swoole 官方安装 https://wiki.swoole.com/#/environment
ubuntu 没有安装 phpize 可执行命令:sudo apt-get install php-dev 来安装 phpize
安装过程 0.下载swoole git clone https://github.com/swoole/swoole-src.git 1. cd swoole-src 2. /use/local/php/bin/phpize #这里要制定绝对路径, 有些人直接使用phpize,会有 Cannot find config.m4. Make sure that you run ‘/usr/local/php/bin/phpize‘ in the top level source directory of the module 使用绝对路径就没这种情况了 3.
./configure --with-php-config=/usr/local/bin/php-config #这里要制定绝对路径 4. make && sudo make install 编译安装到系统成功后,需要在 php.ini 中加入一行 extension=swoole.so 来启用 Swoole 扩展 php --ri swoole 可以看到info,说么成功了,ubnutu 自带php ,如果有又不想使用,那么自行使用绝对路径 /use/local/php/bin/php --ri swoole
原文:https://www.cnblogs.com/wtcl/p/12634049.html