1.下载swoole源码

https://gitee.com/swoole/swoole/tree/1.9/

swoole-swoole-v1.9.22.zip 解压

进入目录

2.运行

mac 安装swoole

提示

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

mac 安装swoole

sudo make install

mac 安装swoole

5.最后在php.ini 里面加上 extension=swoole.so

在phpinfo里面查看

mac 安装swoole

 

转载于:https://my.oschina.net/snxun/blog/1574217

相关文章: