启动nginx报错:libcrypto.so: cannot open shared objec

在nginx启动时,报如下错误:

/opt/nginx/sbin/nginx: error while loading shared libraries: libcrypto.so: cannot open shared objec

解决方法:

1. 查看本机的libcrypto.so位置

locate libcrypto.so

2. 编辑vi /etc/ld.so.conf

include /etc/ld.so.conf.d/*.conf

/opt/nginx/lib/

/usr/local/lib

3. 检查错误

/sbin/ldconfig

4. 启动nginx

可修改软链接到libcrypto.so

ln -s libcrypto.so.0.9.8 libcrypto.so

相关推荐