最新版本可以在这个网站下载:
https://www.openssl.org/source/
wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz
解压后安装:
./configure
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: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory]
解决
cp /usr/local/lib/libcrypto.so.1.1 /usr/lib64/
cp /usr/local/lib/libssl.so.1.1 /usr/lib64/
or
ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
ln -s /usr/local/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1