【解决方法】macOS 安装Resin失败:fatal error: 'openssl/ssl.h' file not found

MacOS版本:10.12.3

Resin版本:4.0.51

进入Resin下载文件根目录,执行configure命令。进行相关配置。

sudo ./configure --prefix=/usr/local/share/resin \
--with-resin-root=/var/resin \
--with-resin-log=/var/log/resin \
--with-resin-conf=/etc/resin

执行完成后提示失败,直接查看执行日志,并发现提示:

conftest.c:1:10: fatal error: 'openssl/ssl.h' file not found

于是我查看了openssl安装目录,通过命令:which openssl,发现已经安装了openssl,安装路径:/usr/bin/openssl

于是百度一番,发现在MacOS的升级最新版本中不再提供openssl。

官方说明:https://lists.apple.com/archives/macnetworkprog/2015/Jun/msg00025.html

于是我认为系统既然不提供openssl,使openssl做为一款软件安装。那么Resin的configure命令说不定会支持配置openssl的路径,于是打开configure文件搜索"openssl"发现如下图:

于是我将Resin的编译命令改了一下指定Openssl的路径:--with-openssl=/usr/local/opt/openssl,重新在Resin根目录下执行:

sudo ./configure --prefix=/usr/local/share/resin \
--with-resin-root=/var/resin \
--with-resin-log=/var/log/resin \
--with-resin-conf=/etc/resin \
--with-openssl=/usr/local/opt/openssl

终于顺利执行完成。

posted @ 2017-03-27 11:01  班然  阅读(2040)  评论(0编辑  收藏  举报