升级 openssl
openssl versions
yum install -y zlib gcc-c++ gcc
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && tar -zxvf openssl-1.1.1g.tar.gz
cd /openssl-1.1.1g
./config shared zlib
make && make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig -v
openssl version
问题
.crypto/comp/c_zlib.c:35:19: fatal error: zlib.h: No such file or directory
解决方法:
yum install -y zlib-devel
..openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
这是由于openssl库的位置不正确造成的。
解决方法:
在root用户下执行:
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1