记录一次失败的Ubuntu 20.04 OpenSSL3.0.5升级记录

本文记录了一次在Ubuntu 20.04上尝试升级OpenSSL到3.0.5失败的过程。在升级过程中,作者学习了如何检查包依赖,并发现OpenSSL3.0.5所需的libc6版本高于系统当前版本,导致升级受阻。考虑到可能的风险,作者决定直接升级到Ubuntu 22.04来获取支持OpenSSL3.0.2的环境。
摘要由CSDN通过智能技术生成

首先声明的是这是一次失败的升级记录
然后,这次升级记录使我学到如何查找包依赖。

在做项目的时候,应要求需要使用最新版本的OpenSSL3.x进行开发,但是我使用的是lubuntu 20.04,默认的是OpenSSL1.1.1f,所以就需要进行升级。

最简单的方式其实是使用Ubuntu22.04,这个支持了较新的OpenSSL3.0.2,这也是我这次最终没办法的办法,反正又不是生产环境。

那么话说回来,为什么记录这个呢?那是因为,我需要对deb这个体系的包依赖怎么查看做一个记录。

首先直接下载openssl的源码包,然后./configuremakemake testmake install不说了,然后把对应的进行连接LD_LIBRARY_PATH配置或者软连接啥的以及ldconfig都不说了,可以参考:Install OpenSSL-3.0.5,因为升级错了,升级这个没用🤦‍。升级完成之后,这个OpenSSL升级成功了,但是并不是开发使用的libssl-dev升级成功了,真的是哔哔哔。

$ openssl version
OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)

使用apt show查看依赖。以下是在lubuntu20.04上看的,当然这个没问题的。也可以看到OpenSSL 1.1.1f依赖(Depends)libc6, libssl1.1。

$ apt show openssl
Package: openssl
Version: 1.1.1f-1ubuntu2.16
Priority: important
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,287 kB
Depends: libc6 (>= 2.15), libssl1.1 (>= 1.1.1)
Suggests: ca-certificates
Homepage: https://www.openssl.org/
Task: minimal
Download-Size: 621 kB
APT-Manual-Installed: no
APT-Sources: https://mirrors.ustc.edu.cn/ubuntu focal-security/main amd64 Packages
Description: Secure Sockets Layer toolkit - cryptographic utility
 This package is part of the OpenSSL project's implementation of the SSL
 and TLS cryptographic protocols for secure communication over the
 Internet.
 .
 It contains the general-purpose command line binary /usr/bin/openssl,
 useful for cryptographic operations such as:
  * creating RSA, DH, and DSA key parameters;
  * creating X.509 certificates, CSRs, and CRLs;
  * calculating message digests;
  * encrypting and decrypting with ciphers;
  * testing SSL/TLS clients and servers;
  * handling S/MIME signed or encrypted mail.

N: There is 1 additional record. Please use the '-a' switch to see it

接下来问题就来了,我需要看OpenSSL3.x的版本依赖。我直接去这里看的libssl-dev | Ubuntu Packages。我不能说这样子我看的对不对,首先明确我这是看的Ubuntu22.04版本的,其中jammy就是Ubuntu22.04版本的代号,libssl-dev依赖libssl3。

- libssl3 (= 3.0.2-0ubuntu1) [not amd64, i386]
	Secure Sockets Layer toolkit - shared libraries

libssl3需要依赖libc6(>=2.34),这一步我的lubuntu20.04 就不满足了。我本机上的版本是2.31:

$ apt search libc6 | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libc6/focal-updates,now 2.31-0ubuntu9.9 amd64 [installed]

然后我就想升级libc6,但是看到askubuntu论坛上How can I get glibc 2.35 on Ubuntu 20.04?How to upgrade libc6 (glibc) beyond v 2.31 on Ubuntu 20.04?这两个问题我就不敢升级了。因为他说:the problem is that glibc is a system package, and a lot of things can break if you install the wrong version. what do you need it for?。玩崩了就不好玩了。还不如直接升级Ubuntu呢。

所以到这里我就没再往下继续了,费这劲干啥,我只是一个写代码的,直接用Ubuntu22.04不就好了么。剩下的就是搞一个虚拟机的事情了。

如果以后有啥要升级的不涉及到这么底层可能会玩崩的升级倒是还可以借鉴一下。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值