解决报错libssl.so.1.1: cannot open shared object file: No such file or directory

王哥哥 Linux, 错误解决 1,973 次浏览 没有评论

报这个错误是因为centos7 自带的ssl 是1.0的,需要你安装1.1的

 

yum -y install wget net-tools telnet bind-utils vim chrony tree psmisc bash-completion ntp gcc

 

wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz –no-check-certificate

tar -xvf openssl-1.1.1g.tar.gz

cd openssl-1.1.1g

./config shared –openssldir=/usr/local/openssl –prefix=/usr/local/openssl

make && make install

 

echo “/usr/local/lib64/” >> /etc/ld.so.conf

ldconfig

 

mv /usr/bin/openssl /usr/bin/openssl.old

mv /usr/lib/openssl /usr/lib/openssl.old

ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl/include/openssl /usr/include/openssl

echo “/usr/local/openssl/lib” >> /etc/ld.so.conf

ldconfig -v

 

执行下面的命令查看下,会发现已经更新成为新的1.1了

openssl version

发表回复

Go