系统相关
首页 > 系统相关> > CentOS7更新openssl,gcc库

CentOS7更新openssl,gcc库

作者:互联网

CentOS7更新openssl

报错信息error while loading shared libraries: libssl.so.1.1: cannot open shared obje

#查看版本
openssl version -a
#cd到usr/local下
cd /usr/local
#wget下载openssl包
wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz
#然后解压
tar -zxvf  openssl-1.1.1l.tar.gz
#进入解压后的目录
cd openssl-1.1.1l
#然后配置安装目录,prefix 是安装目录,openssldir 是配置文件目录,另外建议安装两次,shared 作用是生成动态连接库。(一行一行执行)
./config  --prefix=/usr/local --openssldir=/usr/local/ssl
make && make install
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make&& make install
#然后再通过命令查看版本
openssl version -a
#如果提示还报错
error while loading shared libraries: libssl.so.1.1: cannot open shared obje
#创建软链接
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
#还报错
error while loading shared libraries: libssl.so.1.1: cannot open shared obje
#创建软链接
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

标签:gcc,openssl,CentOS7,so.1,usr,shared,local,libssl
来源: https://www.cnblogs.com/AnNing21/p/15528743.html