MacOS系统XAMPP7.0.26上安装swoole

1. 直接pecl install swoole报错
gavin$ sudo pecl install swoole
Password:
No releases available for package “pecl.php.net/swoole”
install failed

2. 以源码的方式安装
下载 http://pecl.php.net/get/swoole-2.0.12.tgz

3. 编译过程如下:

tar -zvxf swoole-2.0.12.tgz
cd swoole-2.0.12
phpize
./configure
make && make install

4. 其中,phpize会报错如下:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script.

以如下办法解决:
wget http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz
tar -zvxf m4-1.4.18.tar.gz
cd m4-1.4.18/
./configure && make && make install
cd ../
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -zvxf autoconf-2.69.tar.gz
cd autoconf-2.69/
./configure && make && make install

欢迎关注我的微信公众号:

 

如无特殊说明,文章均为本站原创,转载请注明出处!

发表回复

您的电子邮箱地址不会被公开。