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

Reasons and solutions for make error when installing swoole

Release: 2019-12-06 11:44:04
Original
5657 people have browsed it

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

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

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

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!

Related labels:
source:php.cn
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