首页 >php框架 >Swoole >FreeBSD下swoole的安装方法

FreeBSD下swoole的安装方法

藏色散人
藏色散人转载
2019-11-22 13:52:352104浏览

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中文网其他相关文章!

声明:
本文转载于:segmentfault.com。如有侵权,请联系admin@php.cn删除
上一篇:暂无下一篇:一文了解什么是swoole