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


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

    在做项目的时候,应要求需要使用最新版本的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)
    
    • 1
    • 2

    使用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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32

    接下来问题就来了,我需要看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
    
    • 1
    • 2

    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]
    
    • 1
    • 2
    • 3
    • 4
    • 5

    然后我就想升级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不就好了么。剩下的就是搞一个虚拟机的事情了。

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

  • 相关阅读:
    CSS高频面试题
    OpenJudge NOI 2.1 15:Counterfeit Dollar
    Windows-docker集成SRS服务器的部署和使用
    循环神经网络(四)
    浏览器跨域问题
    how to alert when etl inbound file delay in GCP storage
    IntelliJ IDEA中配置Tomcat(超详细)
    这3个扩展人脉小技巧,你还不来学?
    Applications of Artificial Intelligence and Machine learning in smart cities
    为什么Python在数据分析行业备受欢迎?优势在哪?
  • 原文地址:https://blog.csdn.net/basil1728/article/details/126282490