E: package has no installation candidate

E: package has no installation candidate

Linux is no doubt a great operating system. It can help in many ways to establish and run a successful business with very little efforts and money. Most errors in Linux are mostly self explanatory but sometime they can be ambiguous as well. The above error is one of them and can lead towards something stupid. There are few other variants of this error given as under: “Every package has no installation candidate”

Issue: While installing openssh-server on Ubuntu 16.10 sever, I was getting the following error:

Package openssh-server 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 ‘openssh-server’ has no installation candidate

E: Every package has no installation candidate

I see the same error when trying to install any package.

Solution:

When any Ubuntu release reaches its “end of life” it receives no further maintenance updates, including critical security upgrades. To keep using Ubuntu 16.10 edit your sources.list file and add following lines.

vi /etc/apt/suource.list

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/%20zesty%20main%20restricted%20universe%20multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/%20zesty%20main%20restricted%20universe%20multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/%20zesty-security%20main%20restricted%20universe%20multiverse
deb http://us.archive.ubuntu.com/ubuntu/%20zesty-updates%20main%20restricted%20universe%20multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/%20zesty-security%20main%20restricted%20universe%20multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/%20zesty-updates%20main%20restricted%20universe%20multiverse

Now update your system

sudo apt update
sudo apt install openssh-server

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.