Home > PHP Framework > Swoole > How to install swoole under FreeBSD

How to install swoole under FreeBSD

藏色散人
Release: 2019-11-22 13:53:21
forward
2103 people have browsed it

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.
Copy after login

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
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template