Skip to content
Advertisement

Broken php and libssl1.1 installation on Ubuntu 16.04

I have been using Ubuntu 16.04. Recently I did some experiments with my PHP installation and I’m afraid I have broken things badly. I tried

sudo apt install php7.0

But it’s showing a dependency and broken package error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.0 : Depends: libapache2-mod-php7.0 but it is not going to be installed or
                   php7.0-fpm but it is not going to be installed or
                   php7.0-cgi but it is not going to be installed
          Depends: php7.0-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Following this, I ran

sudo apt install php7.0-common

and the response is

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.0-common : Depends: libssl1.1 (>= 1.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

It seems the dependency libssl1.1 is missing so I have tried to install it manually with

sudo apt install libssl1.1

And here is the response

Reading package lists... Done
Building dependency tree       
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

I am kinda stuck at this point. Did I break my os for good?

Advertisement

Answer

I have resolved the issue by installing libssl manually.

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement