What does “Package has no installation candidate” mean?
Once invoked, apt will search through the list of all available packages from loaded repositories to find the specified package. The “Package the_name has no installation candidate” error indicates that the package named the_name is found in the applications catalog, but none of the available versions is made for your OS version.
Now you have two options: either try to install an older version of the software and hope that it’s backwards compatible, or look for another ways to install the same software.
“no installation candidate” vs “cannot locate package”
“Package has no installation candidate” is often confused with “cannot locate package” error, not to mention a similar error message – Depends: package_name but it is not going to be installed.
“Cannot locate package” is another common error in
apt-get, which simply means that the package name is not found in the software database.
Meanwhile, “no installation candidate” tells us that the package is, in fact, found in the database, but no version is suitable with your current setup.
Debug : Check package builds with rmadison
rmadison is a command line program which allows you to query Debian/Ubuntu software database to fetch information about a specific package.
You can install
rmadison on any Debian/Ubuntu system by running the following command:
sudo apt install devscripts
Once you’ve had
rmadison installed, simply run the following command to get more information about a package.
You can also pipe the output to
grep to filter out only the piece of info you’re insterested in. In this case, for example, if you need to know which version of
curl is made for Ubuntu
focal release, run:
rmadison package_name | grep focal
If you see one or more entries returned, the package you’re looking for does exist in Debian/Ubuntu official repositories. You can safely assume that the “Package has no installation candidate” error comes from a missing/commented line in
Otherwise, if you don’t see any output, it means that the package doesn’t have a build for your OS version, at least not in the loaded repositories.
Update apt-get package catalog
Sometimes, an outdated package database can cause strange errors, you should always keep your apt-get software catalog updated before attempting any other fixes.
In order to update apt-get package catalog, simply run
sudo apt-get update. It instructs
apt to download the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
Verify that all repository channels are enabled
If you knew for sure that the software is built for your OS version (either by using
rmadison or Googling), you can follow the steps below to enable all repository channels in Ubuntu. After doing so, try installing the package again to see if the problem goes away.
- Open Software & Updates to open up the settings for software repositories
- In Ubuntu Software tab, make sure that you checked the first 4 checkboxes.
Look for another installer format of the same software
apt-get is the most popular way to install software on Debian/Ubuntu systems, but it’s not the only one. In recent years, other package formats have been developed to solve some of
AppImage is in increasingly popular format which bundles all the dependencies and the application itself into one package. There is also snap, which runs applications in a contained sandbox, allowing them to run effortlessly in different setups. Flatpak is also a popular choice of distributing software, with its own Flathub catalog.
We hope that the information above helped you fix “Package has no installation candidate” error message. We’ve written a few other guides on other common
apt errors such as fixing “apt-get : command not found”, apt-get: Could not resolve archive.ubuntu.com or fixing “Depends: package_name but it is not going to be installed”.