您好,欢迎访问一九零五行业门户网

swoole安装失败怎么办

swoole安装失败怎么办?
常见错误
make或make install无法执行或编译错误
notice: php message: php warning: php startup: swoole: unable to initialize modulemodule compiled with module api=20090626php compiled with module api=20121212these options need to matchin unknown on line 0
php版本和编译时使用的phpize和php-config不对应,需要使用绝对路径来进行编译。使用绝对路径执行php。
/usr/local/php-5.4.17/bin/phpize./configure --with-php-config=/usr/local/php-5.4.17/bin/php-config/usr/local/php-5.4.17/bin/php server.php
缺少mysql头文件
php_mysqli_structs.h:64:23: fatal error: my_global.h: no such file or directory
没有找到mysqlclient的头文件,需要安装mysqlclient-dev
建议自行编译php,不要使用linux包管理系统自带的php版本
缺少pcre.h头文件
fatal error: pcre.h: no such file or directory
原因是缺少pcre,需要安装libpcre
cannot find autoconf
phpize命令需要autoconf工具,请先安装它。
make install失败
make install需要root权限,如果不是以root用户登录的,请用sudo或su,再进行安装。
修改了php.ini后,php -m或phpinfo中没有swoole
请移步该文档
缺少hiredis.h
编译配置时启用--enable-async-redis,但没有安装hiredis库,编译时会报fatal error: 'hiredis/hiredis.h' file not found,请安装hiredis库或者去掉--enable-async-redis选项。
error: too many arguments to function 'zend_exception_error'
你的php版本低于php-5.3.10,请升级php版本。
推荐学习: swoole教程
以上就是swoole安装失败怎么办的详细内容。
其它类似信息

推荐信息