【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 小时前
初探 Flask
后端·python·flask·html
星栈独行5 小时前
我在 Rust 全栈项目里用 JWT 做无状态认证
开发语言·后端·rust·前端框架·开源·github·web
Java爱好狂.6 小时前
Java程序员体系化学习路线(2026最新版)
java·后端·java面试·java架构师·java程序员·java八股文·java学习路线
陈随易6 小时前
Redis 8.8发布,一定要更新
前端·后端·程序员
装不满的克莱因瓶6 小时前
SpringBoot 如何将 lib 目录中jar包打包进最终的jar包里面
spring boot·后端·maven·jar·mvn
ltl7 小时前
Transformer 原论文实验结果:为什么 28.4 BLEU 足以改写路线图
后端
excel8 小时前
为什么我推荐使用 Termius:现代 SSH 工具的完整体验
前端·后端
卷毛的技术笔记8 小时前
Java后端硬核实战:用Spring AI Alibaba+Redis给LLM装上“超强记忆中枢”
java·人工智能·redis·后端·spring·ai·系统架构
IT_陈寒9 小时前
Java的Optional差点让我掉坑里,这几个坑你别踩
前端·人工智能·后端
子兮曰10 小时前
Harness 驾驭工程深度教程:从 AGENTS.md 到全链路 AI 编码基础设施
前端·后端·ai编程