Home  >  Article  >  PHP Framework  >  Reasons and solutions for make error when installing swoole

Reasons and solutions for make error when installing swoole

尚
Original
2019-12-06 11:44:045564browse

Reasons and solutions for make error when installing swoole

An error occurred when installing swoole. The error message is as follows:

/Users/luzhuang/Downloads/swoole-src-4.4.3/include/swoole.h:596:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [php_swoole_cxx.lo] Error 1

Cause of error

The error is obvious. Openssl/ssl.h cannot be found. First, we need to Confirm whether openssl is installed on the computer

Mac installation openssl

 brew install openssl

Since it cannot be found, you need to manually specify the openssl directory:

./configure --enable-coroutine --enable-openssl  --enable-http2  --enable-async-redis --enable-sockets --enable-mysqlnd --with-openssl-dir=/usr/local/Cellar/openssl/1.0.2s --with-php-config=/Applications/MAMP/bin/php/php7.2.14/bin/php-config

Recommended learning: swoole video tutorial

The above is the detailed content of Reasons and solutions for make error when installing swoole. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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