ubantu libssl.so.1.1: cannot open shared object file

libssl.so.1.1: cannot open shared object file

使用 Ubuntu 22.04 时,有时候会遇到如下错误

error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

这是因为Ubuntu 22.04 默认使用的是 openssl3.0 ,但是大多为 Ubuntu 生成的可执行文件依赖 openssl 1.1

安装Openssl 1.1

我们可以采取源码安装的方式解决这个问题

下载源码包并解压

首先确定已经安装下载工具

apt install -y wget

随后执行下载操作

wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz

对下载的文件解压并进入到文件夹中

tar xvf openssl-1.1.1q.tar.gz && cd openssl-1.1.1q

安装 GCC、Perl、Make

首先确保 Ubuntu 22.04 已经安装 GCC Perl Make工具

如果你不知道这几样是什么,那么请执行安装命令

sudo apt install -y perl gcc make

执行 config 配置

在成功安装上述工具后执行 config命令

./config

编译

随后执行 make

make

安装

这时 openssl1.1 就已经编译好了,我们还需要将动态库放入 /usr/local/lib中,执行 make install 即可

sudo make install

设置环境变量并生效

有些可执行文件读取的动态链接库的路径不同,这里最好设置一下动态链接库的环境变量

sudo echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib" >> /etc/profile

执行 source /etc/profile 使其在当前客户端生效

source /etc/profile

相关推荐
夜郎king1 小时前
SpringBoot+PostgreSQL + 硅基流动大模型从零搭建 Text-to-SQL 智能问答系统
spring boot·postgresql·text-to-sql·llm大模型
2501_942389552 小时前
Nifty IT指数的K线犹如断线的风筝
人工智能·postgresql·时序数据库·storm·tdengine
一只小菜鸡..6 小时前
南京大学 操作系统 (JYY) 学习笔记:并发 Bug 的地狱——数据竞争、死锁与原子性违反
笔记·学习·bug
OK_boom1 天前
C# Dapper匹配postgresql的jsonb类型
开发语言·postgresql·c#
名字还没想好☜1 天前
React 受控输入框光标跳到末尾:格式化输入时的 selection 丢失 bug 与修复
前端·javascript·react.js·bug·react·next.js
SelectDB技术团队1 天前
当 PostgreSQL 面临性能瓶颈:80TB 电商业务迁移至 Apache Doris 的实践思考
数据库·postgresql·apache
梦想画家1 天前
告别轮询:基于PostgreSQL CDC构建实时数据管道
数据库·postgresql·kafka·实时湖仓
粗体鱼2 天前
RAG/Agent 记忆混合检索多路召回:RRF 算法与Chunk RRF、Document RRF如何决策TopK
postgresql·milvus·es·rag·rff·mermory
SelectDB2 天前
当 PostgreSQL 面临性能瓶颈:80TB 电商业务迁移至 Apache Doris 的实践思考
postgresql
IvorySQL2 天前
PG 日报|PG20 正式计划移除 refint 模块,官方指引迁移原生外键
数据库·人工智能·postgresql·开源·区块链