1.下载swoole源码
https://gitee.com/swoole/swoole/tree/1.9/
swoole-swoole-v1.9.22.zip 解压
进入目录
2.运行
提示
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
3.安装autoconf
http://yangjunwei.com/a/2413.html
brew install autoconf
如果没有brew 要先安装brew
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
4.在运行/Applications/XAMPP/bin/phpize
./configure --with-php-config=/Applications/XAMPP/bin/php-config
sudo make install
5.最后在php.ini 里面加上 extension=swoole.so
在phpinfo里面查看