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

Solution 1:

The results of rmadison libssl1.0.0 show that the libssl1.0.0 package was dropped from the default Ubuntu repositories after Ubuntu 18.04.

$ rmadison libssl1.0.0
 libssl1.0.0 | 1.0.1-4ubuntu3     | precise          | amd64, armel, armhf, i386, powerpc
 libssl1.0.0 | 1.0.1-4ubuntu5.39  | precise-security | amd64, armel, armhf, i386, powerpc
 libssl1.0.0 | 1.0.1-4ubuntu5.39  | precise-updates  | amd64, armel, armhf, i386, powerpc
 libssl1.0.0 | 1.0.1f-1ubuntu2    | trusty           | amd64, arm64, armhf, i386, powerpc, ppc64el
 libssl1.0.0 | 1.0.1f-1ubuntu2.27 | trusty-security  | amd64, arm64, armhf, i386, powerpc, ppc64el
 libssl1.0.0 | 1.0.1f-1ubuntu2.27 | trusty-updates   | amd64, arm64, armhf, i386, powerpc, ppc64el
 libssl1.0.0 | 1.0.2g-1ubuntu4    | xenial           | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libssl1.0.0 | 1.0.2g-1ubuntu4.15 | xenial-security  | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libssl1.0.0 | 1.0.2g-1ubuntu4.15 | xenial-updates   | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 libssl1.0.0 | 1.0.2n-1ubuntu5    | bionic           | amd64, arm64, armhf, i386, ppc64el, s390x
 libssl1.0.0 | 1.0.2n-1ubuntu5.3  | bionic-security  | amd64, arm64, armhf, i386, ppc64el, s390x
 libssl1.0.0 | 1.0.2n-1ubuntu5.3  | bionic-updates   | amd64, arm64, armhf, i386, ppc64el, s390x

The results of apt search libssl show that the libssl package has been upgraded to libssl1.1 in Ubuntu 19.04 (and later). To install it open the terminal and type:

sudo apt install libssl1.1

Solution 2:

If you need libssl1.0.0 on anything after Debian 8 (Jessie), you'll need to update your apt sources before apt installing.

Adding the following lines to my dockerfile worked:

RUN echo "deb http://security.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y --no-install-recommends \
    libssl1.0.0

Solution 3:

You need to understand why your package manager is trying to install libssl1.0.0. aptitude why libssl1.0.0 will tell you.

Solution 4:

Add http://security.ubuntu.com/ubuntu/ bionic-security to the sources.list file:

sudo -i
echo "deb http://security.ubuntu.com/ubuntu/ bionic-security main" >> /etc/apt/sources.list
sudo apt update && apt-cache policy libssl1.0.0