【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

测试状态,无报错即成功

相关推荐
金銀銅鐵5 分钟前
[Java] 用GUI展示class文件顶层的 access_flags
后端·python·ai编程
IT_陈寒1 小时前
Vue的数组更新把我坑惨了
前端·人工智能·后端
高晶1 小时前
Android 智能语音开发新手入门实战
后端·程序员
励志不掉头发的内向程序员1 小时前
鼠标点一下,图形是怎么画出来的?拆解 CAD 的 Action 状态机
后端·架构
高晶1 小时前
Android 机器视觉新手入门:从扫码到人脸实战
后端·程序员
写码跑山的老艾1 小时前
基于 FSB 快速搭建 AI 客服:专家扩展与 Spring Boot 接入
后端
云边有个稻草人1 小时前
从语句编写到执行追踪:金仓 SQL 编辑器实战指南
后端
用户204937554951 小时前
中文流式识别偶发重复词的定位与修复实践
后端
小蒜学长2 小时前
基于Java的公司采购系统的设计与实现(代码+数据库+LW)
java·数据库·spring boot·后端·公司采购系统