Ubuntu – Cannot install via apt-get

Issue

I cannot install via apt-get as I get the message,

E: Package ssh has no installation candidate

When running apt-get install [package name] you get,

root@ubuntu:~$ sudo apt-get install ssh
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ssh 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 ssh has no installation candidate

Solution 

root@ubuntu:~$ sudo apt-get install update

Once the update has finished then re-try your apt-get install [package name]

Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial