解决openssl version报错

Nginx安装及启动报错解决笔记

在安装nginx时,执行配置命令报错,找不到openssl包,百度后修改配置文件

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

 

提示加--with-openssl ,加上参数后可以配置过去,但不能make成功

百度后修改配置文件

vi /nginx解压目录/auto/lib/openssl/conf 修改库的路径为lib64

ngx_feature_libs="-R/usr/local/lib64 -L/usr/local/lib64 -lssl -lcrypto" #修改路径

ngx_feature_libs="-L/usr/local/lib64 -lssl -lcrypto" #修改路径

修改后编译安装成功,但启动nginx还是报错,找不到libssl.so.3,

./nginx: error while loading shared libraries: libssl.so.3: cannot open shared obj

执行openssl version也报找不到包目录。

error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

查看ssl包是存在的
[root@localhost sbin]# ll /usr/local/lib64/*ssl*
 

执行下面两个命令后

echo "/usr/local/lib64/" >> /etc/ld.so.conf

ldconfig

openssl version 执行成功

nginx 也启动成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值