6

sudo apt-get install libssl1.1

Reading package lists... Done Building dependency tree... Done Reading state information... Done Package libssl1.1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libssl1.1' has no installation candidate

Piyush Prajapati
  • 449
  • 1
  • 4
  • 7
  • 2
    Please don't just throw your error messages at us but give us some information about your system and what you want to achieve and why. Or at least ask a concrete question. On the one hand, that will make it easier for us to help you and on the other hand, it makes us fell less mis-used as robots... – ahuemmer Aug 06 '22 at 14:17

3 Answers3

23
sudo -i
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
Piyush Prajapati
  • 449
  • 1
  • 4
  • 7
  • @IndieGameDev: While that's all certainly true, and very good advice to share with the author, it still remains an answer and should be marked as "Looks OK" ([source](https://meta.stackoverflow.com/questions/287563/youre-doing-it-wrong-a-plea-for-sanity-in-the-low-quality-posts-queue)). – Jeremy Caney Aug 06 '22 at 00:18
2

For all that still face the same problem

  1. Go to http://archive.ubuntu.com/ubuntu/pool/main/o/openssl
  2. find the exact version of libssl for example libssl1.1.1
  3. wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1\~18.04.20_amd64.deb
  4. Then install
  5. sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb

The problem should be fixed

Feisal Ali
  • 351
  • 2
  • 9
1

I've not dug deep enough to find the reason behind the missing libssl1.1 library, but it seems the LTS 22.04 isn't including it for the time being.

I wrote the following script for my systems to have it installed, as one of the tools I use to setup the system requires it.

Hope others find this useful.

# Find the most recent 1.1 libssl package in the ubuntu archives
BASE_URL='http://archive.ubuntu.com/ubuntu/pool/main/o/openssl'
FILE="$( # The get parameters in the URL sort the results by descending chronological order
    curl -s "${BASE_URL}/?C=M;O=D" $(\
        # Make sure all tags are on separate lines - makes grep-work later easier \
        ) | tr '>' '>\n' $(\
        # extract all the unique links on the page \
        ) | grep 'href' | sed 's/^.*href="\([^"]*\)".*$/\1/p' | awk '!a[$0]++' $(\
        # pick the most relevant items on the list (libssl 1.1 for amd64 arch) \
        ) | grep "libssl" | grep "1.1_" | grep "amd64.deb" $(\
        # choose only the last one \
        ) | tail -1 )"
# Grab the file and if download was successful, install it with sudo
wget "${URL_BASE}/${FILE}" && sudo dpkg -i "./${FILE}"
Lockszmith
  • 2,173
  • 1
  • 29
  • 43