macOS 编译安装php event 扩展问题 Cannot find OpenSSL's

macOS configure: error: Cannot find OpenSSL's 的错误解决。

checking for include/event2/event.h... found in /usr/local
checking for libevent version... ok
checking for event_free in -levent_core... yes
checking for evdns_base_free in -levent_extra... yes
checking for pkg-config... no
configure: error: Cannot find OpenSSL's 

1.命令行执行openssl version查看对应版本

LibreSSL 2.8.3

说明是已安装openssl扩展,但是不能找到。那我们就手动去找文件的绝对位置信息,进入对应扩展位置进行查看文件

cd /usr/local/Cellar/ &&  ll   

输出以下信息:


Cellar.png

2.获取绝对地址
可以看到有[email protected]这文件夹,继续进入文件夹到bin目录地址

我这里是/usr/local/Cellar/[email protected]/1.1.1h

3.重新执行编译命令
./configure --with-openssl-dir=/usr/local/Cellar/[email protected]/1.1.1h

你可能感兴趣的:(macOS 编译安装php event 扩展问题 Cannot find OpenSSL's)