Home>Article>PHP Framework> How to install swoole under FreeBSD
Installation method of swoole under FreeBSD
1. Follow the wiki of swoole official website and download the source code
2.cd swoole
3.phpize
The execution of this step will report an error on FreeBSD that installs PHP through PKG
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.
Solution:pkg install autoconf
4../configure
5.make
When performing this step on FreeBSD, the following error will be reported
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
Cause of the problem: "pcre.h" of the pcre installed by FreeBSD is not in the file path searched by swoole
Solution:ln -s /usr/local/include/pcre .h /usr/include/pcre.h
6.`make install
7.Add extension=swoole.so in the php.ini file
The above is the detailed content of How to install swoole under FreeBSD. For more information, please follow other related articles on the PHP Chinese website!