【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

测试状态,无报错即成功

相关推荐
风象南28 分钟前
SpringBoot实现简易直播
java·spring boot·后端
这里有鱼汤37 分钟前
有人说10日低点买入法,赢率高达95%?我不信,于是亲自回测了下…
后端·python
武子康1 小时前
Java-39 深入浅出 Spring - AOP切面增强 核心概念 通知类型 XML+注解方式 附代码
xml·java·大数据·开发语言·后端·spring
米粉03051 小时前
SpringBoot核心注解详解及3.0与2.0版本深度对比
java·spring boot·后端
一只帆記3 小时前
SpringBoot EhCache 缓存
spring boot·后端·缓存
yuren_xia6 小时前
Spring Boot中保存前端上传的图片
前端·spring boot·后端
JohnYan9 小时前
Bun技术评估 - 04 HTTP Client
javascript·后端·bun
shangjg39 小时前
Kafka 的 ISR 机制深度解析:保障数据可靠性的核心防线
java·后端·kafka
青莳吖10 小时前
使用 SseEmitter 实现 Spring Boot 后端的流式传输和前端的数据接收
前端·spring boot·后端
我的golang之路果然有问题10 小时前
ElasticSearch+Gin+Gorm简单示例
大数据·开发语言·后端·elasticsearch·搜索引擎·golang·gin