您的位置 首页 技术

swoole安装失败怎么办

swoole安装失败怎么办? 常见错误 make或make install无法执行或编译错误 NOTICE: PHP message: PHP Warning: PHP Start…

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安装失败怎么办的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/17629.html

为您推荐

返回顶部