openssl源码安装后,编译nginx-1.9.7或者openresty找不到OpenSSL的解决办法

在源码安装openssl后,编译nginx-1.9.7或openresty时遇到找不到openssl库的错误。问题在于nginx没有在正确路径下找到openssl。解决方案是将/usr/local/ssl/lib/目录下的文件复制到系统默认的lib目录,或者通过配置选项--with-openssl指定openssl源码目录进行编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:nginx编译找不到openssl

现象:源码安装openssl的目录是/usr/local/ssl/

就算把/usr/local/ssl/lib 添加到 /etc/ld.so.conf内,并且ldconfig -v,发现nginx编译时依然报找不到openssl的错误,如下

#./configure --with-http_ssl_modul

--------------------------------------------------------------

checking for OpenSSL library ... not found
checking for OpenSSL library in /usr/local/ ... not found
checking for OpenSSL library in /usr/pkg/ ... not found
checking for OpenSSL library in /opt/local/ ... not found


./configure: error: SSL modules require the OpenSSL library.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值