站长资讯网
最全最丰富的资讯网站

安装swoole出现make报错的原因与解决方法

安装swoole出现make报错的原因与解决方法

安装swoole报错,错误信息如下:

/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

报错原因

报错很明显,找不到 openssl/ssl.h ,首先要确认电脑上有没有安装 openssl

Mac安装openssl

 brew install openssl

既然它找不到,那么就需要手动的指定 openssl 的目录:

./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

推荐学习: swoole视频教程

赞(0)
分享到: 更多 (0)