Skip to content

Install libssl3

Brian K. White edited this page Mar 19, 2022 · 4 revisions

Install libssl3 on systems before Jammy

credit: https://github.com/amedee

Ubuntu mainline kernel packages 5.15.7 and later bump a dependency from libssl1.1 (>= 1.1.0) to libssl3 (>= 3.0.0~~alpha1).

However, package libssl3 is not available for Ubuntu 21.10 Impish Indri. It's only available for Ubuntu 22.04 Jammy Jellyfish and later.

libssl3 further depends on libc6>=2.34 and debconf, but they are available in 21.10 repositories.

Here are a few different ways to resolve the dependency:

Option 1

Use apt pinning to install libssl3 from a Jammy repo, without pulling in everything else from Jammy.

This is more complicated, but it allows the libssl3 package to receive updates automatically.
Do all the following as root.

  • Create an apt config file to specify your system's current release as the default release for installing packages, instead of simply the highest version number found. We are about to add a Jammy repo to apt, which will contain a lot of packages with higher version numbers, and we want apt to ignore them all.
    echo 'APT::Default-Release "impish";' >/etc/apt/apt.conf.d/000local
    
  • Add the Jammy repository to the apt sources. If your system isn't "impish", change that below.
    awk '($1$3$4=="debimpishmain"){$3="jammy" ;print}' /etc/apt/sources.list >/etc/apt/sources.list.d/jammy.list
    
  • Pin libssl3 to the jammy version in apt preferences. This overrides the Default-Release above, just for the libssl3 package.
    cat <<-%%EOF >/etc/apt/preferences.d/jammy_libssl3.pref
    Package: libssl3
    Pin: release n=jammy
    Pin-Priority: 900
    %%EOF
    
  • Install libssl3:
    apt update && apt install libssl3
    

Later, when Jammy is officially released, delete all 3 files created above

rm -f /etc/apt/apt.conf.d/000local \
      /etc/apt/sources.list.d/jammy.list \
      /etc/apt/preferences.d/jammy_libssl3.pref

Option 2

Download the libssl3 deb package for Jammy and install it manually with dpkg -i filename.deb.