{"id":1407,"date":"2011-08-16T11:34:20","date_gmt":"2011-08-16T15:34:20","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1407"},"modified":"2013-03-20T08:44:21","modified_gmt":"2013-03-20T12:44:21","slug":"ubuntu-apt-get-package-packagename-has-no-installation-candidate","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/ubuntu-apt-get-package-packagename-has-no-installation-candidate","title":{"rendered":"[Ubuntu] apt-get: Package has no installation candidate"},"content":{"rendered":"<p>When you try to install a package using apt-get, APT searches it&#8217;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.<\/p>\n<p><strong>If the package name does not exist in APT&#8217;s database<\/strong>, it does not have any idea what you are trying to install and<strong> you see the following erro<\/strong>r message:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">#\u00a0 apt-get install &lt;packagename&gt;<\/span>\r\nReading package lists... Done\r\nBuilding dependency tree... Done\r\nPackage aptitude is not available, but is referred to by another package.\r\nThis may mean that the package is missing, has been obsoleted, or\r\nis only available from another source\r\n<strong>E: Package &lt;packagename&gt; has no installation candidate<\/strong><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>So, the<strong> above error occurs for 2 reasons:<\/strong><\/p>\n<p><span style=\"color: #0000ff;\"><strong>1)<\/strong><\/span> The APT&#8217;s database is not updated.<\/p>\n<p>A quick fix is to <strong>update the APT&#8217;s database<\/strong> as per the defined sources list.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># apt-get update<\/span>\r\n<span style=\"color: #0000ff;\"># apt-get upgrade<\/span>\r\n<span style=\"color: #0000ff;\"># apt-get install &lt;packagename&gt;<\/span><\/pre>\n<\/blockquote>\n<p>This is it. If isn&#8217;t fixed, check point #2 below.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>2)<\/strong><\/span> The package itself isn&#8217;t available on the official Ubuntu repository.<\/p>\n<p><strong><\/strong>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you try to install a package using apt-get, APT searches it&#8217;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.<br \/>\nIf the package name does not exist in APT&#8217;s database, it does not have any idea what you are trying to install and you see the following error message:<\/p>\n<p>#\u00a0 apt-get install &lt;packagename&gt;<br \/>\nReading package lists&#8230; Done<br \/>\nBuilding dependency tree&#8230; Done<br \/>\nPackage aptitude is [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1277,1280,1278,1279,1276],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1407"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1407"}],"version-history":[{"count":18,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1407\/revisions"}],"predecessor-version":[{"id":2289,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1407\/revisions\/2289"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}