FreeBSD下swoole的安裝方法
1.依照swoole官網的wiki,下載原始碼
2.cd swoole
#3.phpize
這一步驟的執行在透過PKG安裝PHP的FreeBSD上面會報錯
Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
解決方案: pkg install autoconf
4../configure
5.make
在FreeBSD上執行這一步驟操作會有如下報錯
In file included from /root/swoole/swoole.c:25: In file included from /usr/local/include/php/ext/spl/spl_iterators.h:27: /usr/local/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file not found
問題產生原因: FreeBSD安裝的pcre的"pcre.h"不在swoole搜尋的檔案路徑
解決方案: ln -s /usr/local/include/pcre .h /usr/include/pcre.h
6.`make install
7.在php.ini檔案中加入extension=swoole.so
以上是FreeBSD下swoole的安裝方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!