Mac 安装swoole

来源:互联网 发布:双色球数据库查询系统 编辑:程序博客网 时间:2024/06/01 22:11
swoole源码下载:
  • https://github.com/swoole/swoole-src/releases 
cd swoole-src-swoole-1.7.19-stable/
  •  vi README.md ,查看相关说明
/Applications/XAMPP/bin/phpize
  • 提示Cannot find autoconf. Please check your autoconf installation and the  $PHP_AUTOCONF environment variable. Then, rerun this script.
  • 原因:没有安装GNU M4和 Autoconfig
    • 下载并安装
      • http://www.gnu.org/software/m4/m4.html
      • http://www.gnu.org/software/autoconf/autoconf.html
./configure --enable-async-mysql
sudo make
  • 提示/usr/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file not found
  • 仍然提示相同的错误
  • 原因:configure时没有指定php-config 参数,由于我系统里装了两个版本的php,所以重新回到上一步指定php-config位置
 ./configure --with-php-config=/Applications/XAMPP/bin/php-config --enable-async-mysql

sudo make install
Installing shared extensions:     /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/
0 0