swoole安裝失敗怎么辦?
常見錯誤
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。
/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版本。
推薦學習:?該文檔
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦