mac pecl安装swoole失败:fatal error: ‘openssl/ssl.h‘ file not found

mac下使用brew安装arm版php7.2,pecl命令安装swoole
命令:pecl install swoole
发生如下报错

/private/tmp/pear/temp/swoole/ext-src/php_swoole_private.h:84:2: error: "Enable openssl support, require openssl library"
#error "Enable openssl support, require openssl library"
 ^
In file included from /private/tmp/pear/temp/swoole/ext-src/php_swoole.cc:16:
In file included from /private/tmp/pear/temp/swoole/ext-src/php_swoole_cxx.h:20:
In file included from /private/tmp/pear/temp/swoole/ext-src/php_swoole_coroutine.h:22:
In file included from /private/tmp/pear/temp/swoole/include/swoole_coroutine.h:22:
In file included from /private/tmp/pear/temp/swoole/include/swoole_socket.h:33:
/private/tmp/pear/temp/swoole/include/swoole_ssl.h:27:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^~~~~~~~~~~~~~~
2 errors generated.
make: *** [ext-src/php_swoole.lo] Error 1
ERROR: `make' failed

openssl本机已安装,所以只需要提示是否启用openssl指定路径即可(以下路径为brew安装openssl路径)

➜  ~ pecl install swoole

...
enable sockets supports? [no] : yes
enable openssl support? [no] : yes --with-openssl-dir=/opt/homebrew/opt/openssl
...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值