swoole linux 安装

swoole linux 安装

使用环境:
1:centos7
2:php5.6
3. swoole 2.0.10
由于服务器已经安装lnmp环境,因此直接安装了swoole。
swoole扩展下载地址:https://github.com/swoole/swoole-src/releases 尽量选择stable版本,alpha版本最好仅用于实验新特性。

cd swoole-src-swoole-1.7.6-stable/
phpize
./configure --enable-async-mysql
sudo make
sudo make install

报错信息1:
make: * No targets specified and no makefile found. Stop.
解决方法

wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
 ./configure -prefix=/usr/local -with-shared-without-debug
make
make install

报错信息2:
configure: error: Cannot find php-config. Please use –with-php-config=PATH
解决方案
一般出现这个错误说明你执行 ./configure 时 –with-php-config 这个参数配置路径错误导致的。
修改为:
./configure –with-php-config=/usr/local/php/bin/php-config
就可以
上面的 /usr/local/php/ 是你的 php 安装路径 ,路径完整填写是 php-config的路径
报错信息3:configure: WARNING: unrecognized options: –enable-async-mysql
解决方案:
直接删除–enable-async-mysql
原因:
从1.8.6版本开始Swoole\MySQL已内置到Swoole中,无需通过–enable-async-mysql编译参数开启。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值