解决Centos6.5 openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory错误
问题
在Centos上编译安装openssl后,运行openssl version出现如下错误:
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 Centos7默认提供的openssl版本是1.0.2的,某些php扩展或者其他软件依赖1.1以上版本 如果过低的话就会报错libssl.so.1.1: cannot open shared object file: No such file or directory 也有执行openssl version时报错和上面一致,这是由于openssl库的位置不正确或未安装1.1以上版本的问题 想要升级openssl版本则需要手动进行编译,报错解决方式很简单,安装正确即可,下面说一下我以Centos7为例,说一下具体的编译安装步骤 1. 下载openssl 从openssl官网下载最新的代码包,因为源站下载速度过慢,所以我使用了腾讯云的镜像 #从官网下载 # wget https://www.openssl.org/source/openssl-1.1.1e.tar.gz #腾讯云提供的镜像 wget https://mirrors.cloud.tencent.com/openssl/source/openssl-1.1.1e.tar.gz 2. 编译openssl tar -xvf openssl-1.1.1e.tar.gz./config shared --openssldir=/usr/local/openssl --prefix=/usr/local/openssl make && make install 编译完成后,使用openssl version来查看一下当前openssl版本号时,你会发现还是1.0.2,所以这里需要做一些额外的配置工作 3. 配置 echo "/usr/local/lib64/" >> /etc/ld.so.conf ldconfig 再次使用openssl version验证版本就可以了
发表评论 已发布 1 条
-
sealonline2026 希望OL服务端2026 希望恋曲[ 怀旧重置BUG版 ]
2026-05-28栏目: 亲自端游
-
ProcessMonitor V2026 服务器程序监视器V2026
2026-03-31栏目: 登陆器
-
AION GM工具2026V6 永恒之塔GM工具
2026-03-07栏目: 登陆器
-
希望ol sealonline服务端启动器 2026[可以下载]
2026-03-07栏目: 登陆器
-
aion永恒之塔通用网关2026-aionemu模拟器aion真端通用版本
2026-02-09栏目: 登陆器
18549800505
4年前 回复 点赞