💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 常见错误 make或make install无法执行或编译错误 ---- NOTICE: PHP message: PHP Warning: PHP Startup: swoole: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20121212 These options need to match in Unknown on line 0 php版本和编译时使用的phpize和php-config不对应,需要使用绝对路径来进行编译。使用绝对路径执行PHP。 ```shell /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头文件 ---- ```shell php_mysqli_structs.h:64:23: fatal error: my_global.h: No such file or directory ``` 没有找到`mysqlclient`的头文件,需要安装`mysqlclient-dev` > 建议自行编译php,不要使用Linux包管理系统自带的php版本 缺少pcre.h头文件 ---- ```shell fatal error: pcre.h: No such file or directory ``` 原因是缺少pcre,[需要安装libpcre](https://wiki.swoole.com/wiki/page/312.html) Cannot find autoconf ---- phpize命令需要`autoconf`工具,请先安装它。 make install失败 ---- make install需要root权限,如果不是以root用户登录的,请用sudo或su,再进行安装。 修改了php.ini后,php -m或phpinfo中没有swoole ---- [请移步该文档](https://wiki.swoole.com/wiki/page/351.html) 缺少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官方QQ群](https://wiki.swoole.com/wiki/page/69.html#entry_h2_1),你的问题会在24小时内被解决。