{"id":3707,"date":"2017-04-03T17:02:29","date_gmt":"2017-04-03T11:32:29","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=3707"},"modified":"2017-04-03T17:02:29","modified_gmt":"2017-04-03T11:32:29","slug":"solved-2-answerscentos-7-yum-install-not-working","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/solved-2-answerscentos-7-yum-install-not-working\/","title":{"rendered":"[ Solved -2 Answers] CentOS 7 &#8211; yum install not working"},"content":{"rendered":"<p><label class=\"label label-warning\">PROBLEM:<\/label><\/p>\n<p>Whenever we want to use command yum install &lt;packagename&gt;\u00a0 \u00a0get error:<\/p>\n<p>No package available<\/p>\n<p>For example,<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">bash code<\/span> <\/div> <pre class=\"language-bash code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-bash code-embed-code\">[root@cpanel1 etc]# yum install autossh<br\/>Loaded plugins: fastestmirror<br\/>Loading mirror speeds from cached hostfile<br\/> * base: centos.t-2.net<br\/> * extras: centos.t-2.net<br\/> * updates: centos.t-2.net<br\/>No package autossh available.<br\/>Error: Nothing to do<br\/>[root@cpanel1 etc]# <\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]\n<p>How do we make it work?<\/p>\n<p><label class=\"label label-info\">SOLUTION 1:<\/label><\/p>\n<p>These steps might help you,<\/p>\n<ol>\n<li>yum clean all &amp; yum clean metadata<\/li>\n<li>Check the files in \/etc\/yum.repos.d and make sure that they don&#8217;t all have enabled = 0 for each repo (there may be more than one per file).<\/li>\n<li>Finally you would be able to do yum update and search for desired packages.<\/li>\n<\/ol>\n<p><label class=\"label label-info\">SOLUTION 2:<\/label><\/p>\n<ul>\n<li>For CentOS\/RHEL 7, autossh is no longer available in Repoforge repository. So you will need to build and compile it from the source, here is what you should do:<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">bash code<\/span> <\/div> <pre class=\"language-bash code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-bash code-embed-code\">$ sudo yum install wget gcc make<br\/>$ wget http:\/\/www.harding.motd.ca\/autossh\/autossh-1.4e.tgz<br\/>$ tar -xf autossh-1.4e.tgz<br\/>$ cd autossh-1.4e<br\/>$ .\/configure<br\/>$ make<br\/>$ sudo make install<\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 yum install not working- Whenever we want to use command yum install get error<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699],"tags":[7214,7217,7228,7223,7225,7237,7236,7232,7221,7218,7222,7238,7231,7230,7219,7220,7227,7226,7224,7235,7240,7213,7234,7233,7239,7215,7229,7216,7241,7212],"class_list":["post-3707","post","type-post","status-publish","format-standard","hentry","category-linux","tag-yum-install-on-centos-7-states-installed-size-of-578mb","tag-yum-install-package-name-to-different-directory","tag-centos-6-epel","tag-centos-7-yum-install-not-working","tag-centos-7-epel","tag-centos-7-install","tag-centos-7-repository","tag-centos-7-yum-repository","tag-centos-7-yum-update-not-working","tag-centos-dist-update-fail","tag-centos-epel","tag-centos-epel-7","tag-centos-packages","tag-centos-repository","tag-centos7-yum-update","tag-conflict-with-base-and-update-repositories","tag-epel-centos","tag-epel-centos-6","tag-epel-centos-7","tag-epel-release-centos-7","tag-epel-repo-centos-6","tag-how-can-i-resolve-duplicates-in-yum","tag-install-centos-7","tag-install-epel-centos-6","tag-install-yum","tag-then-fails-requiring-75gb-more-space-on","tag-yum-epel","tag-yum-problem-on-centos-6-7","tag-yum-repository-centos-7","tag-yum-update-is-not-working-properly-in-centos"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/3707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=3707"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/3707\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=3707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=3707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=3707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}