【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

测试状态,无报错即成功

相关推荐
Thneonl24 分钟前
Claude Code 频繁 Compacting?发布次日我根治了 2 个痛点
后端·rust
环境栈笔记2 小时前
指纹浏览器安卓怎么用?从运行位置到功能验收,先把三种方案分清
前端·人工智能·后端·自动化
小小张说故事2 小时前
Python 的 list 为什么能装下任何类型?拆开 PyObject* 数组,以及它让你多付了多少内存
后端·python
小蒜学长3 小时前
基于SpringBoot 框架的自媒体新闻系统的设计与实现(代码+数据库+LW)
java·spring boot·后端·mysql数据库·自媒体新闻管理系统
kingx33 小时前
网络安全事件应急响应:X集团 WebServer 入侵溯源与处置
中间件·web·应急响应·取证·恶意样本
IT_陈寒3 小时前
JavaScript实战技巧总结:深挖数组遍历的性能陷阱与实战解法
前端·人工智能·后端
学长毕设13 小时前
基于springboot的食品仓库管理系统
java·spring boot·后端
滴滴答答哒13 小时前
ASP.NET Core + FaceRecognitionDotNet 人脸识别实战:DI 单例、特征向量持久化与 1:N 比对
后端·asp.net
captain37616 小时前
MyBatis操作数据库(入门2)
java·数据库·spring boot·后端·spring·mybatis
IT_陈寒17 小时前
Java序列化踩坑记:对象循环引用让我加班两小时
前端·人工智能·后端