【openssl】 version `OPENSSL_3.0.3‘ not found 问题

【openssl】 version `OPENSSL_3.0.3' not found 问题

使用openssl时候报错:

bash 复制代码
openssl lib/libcrypto.so.3: version `OPENSSL_3.0.3' not found

查阅CSDN发现有博主说把别的地方的libcrypto.so.3 复制过去就好了。

尝试无效

警告!这个操作不对:

不要复制不要复制不要复制!!!!

接下来定位问题,定位到issue:

bash 复制代码
[lib64/libcrypto.so.3: version `OPENSSL_3.0.3' not found · Issue #19801 · openssl/openssl](https://github.com/openssl/openssl/issues/19801)

https://github.com/openssl/openssl/issues/19801

复制代码
Do you have two OpenSSL installs? It appears that you have the Fedora OpenSSL libraries in /lib64 and a local install in /usr/local/lib64. _The linux loader won't pick up libraries from the current directory._

You don't indicate which openssl is in use: `which openssl`. If you have `/usr/local/bin` before `/usr/bin` in your `${PATH}`, then you are picking up the local install binary, but it's finding the system installed libraries in `/lib64`. If you want to use the local installed libraries, you may need to update `ldconfig` and/or set the `LD_LIBRARY_PATH=/usr/local/lib64`.  
e.g.

LD_LIBRARY_PATH=/usr/local/lib64 /usr/local/bin/openssl help

vs.

/usr/bin/openssl help

这个问题一般是在自带的openssl外又安装了新版本的openssl引发的,系统不能很好区分两个安装的目录依赖。需要进行环境变量的设置

linux下编辑~/.bashrc文件

复制代码
export PATH="/usr/local/bin:$PATH"  
export LD_LIBRARY_PATH="/usr/local/lib64:$PATH"

如果报错的文件夹是lib那就把lib64改成lib即可

bash 复制代码
source ~/.bashrc

让配置生效

bash中输入

bash 复制代码
openssl version

测试状态,无报错即成功

相关推荐
用户21991679703911 分钟前
.Net通过EFCore和仓储模式实现统一数据权限管控并且相关权限配置动态生成
后端·github
用户479492835691517 分钟前
node_modules 太胖?用 Node.js 原生功能给依赖做一次大扫除
前端·后端·node.js
开心就好202520 分钟前
苹果iOS设备免越狱群控系统完整使用指南与应用场景解析
后端
ss27337 分钟前
SpringBoot+vue养老院运营管理系统
vue.js·spring boot·后端
用户83562907805139 分钟前
使用 C# 高效解析 PDF 文档:文本与表格提取实战指南
后端·c#
zhangyifang_00941 分钟前
Spring中的BeanFactory类
java·后端·spring
掘金一周1 小时前
【用户行为监控】别只做工具人了!手把手带你写一个前端埋点统计 SDK | 掘金一周 12.18
前端·人工智能·后端
开心就好20251 小时前
iOS App 加固方法的实际应用,安全不再只是源码问题
后端
冒泡的肥皂1 小时前
AI小应用分享
人工智能·后端
阿虎儿1 小时前
本地部署docker完整版minIO镜像
后端