{"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 <packagename>\u00a0 \u00a0get error:<\/p>\n<p>No package available<\/p>\n<p>For example,<\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201d%5Broot%40cpanel1%20etc%5D%23%20yum%20install%20autossh%0ALoaded%20plugins%3A%20fastestmirror%0ALoading%20mirror%20speeds%20from%20cached%20hostfile%0A%20*%20base%3A%20centos.t-2.net%0A%20*%20extras%3A%20centos.t-2.net%0A%20*%20updates%3A%20centos.t-2.net%0ANo%20package%20autossh%20available.%0AError%3A%20Nothing%20to%20do%0A%5Broot%40cpanel1%20etc%5D%23%20%0A\u201d message=\u201dbash code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]\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 & yum clean metadata<\/li>\n<li>Check the files in \/etc\/yum.repos.d and make sure that they don\u2019t 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:[pastacode lang=\u201dbash\u201d manual=\u201d%24%20sudo%20yum%20install%20wget%20gcc%20make%0A%24%20wget%20http%3A%2F%2Fwww.harding.motd.ca%2Fautossh%2Fautossh-1.4e.tgz%0A%24%20tar%20-xf%20autossh-1.4e.tgz%0A%24%20cd%20autossh-1.4e%0A%24%20.%2Fconfigure%0A%24%20make%0A%24%20sudo%20make%20install%0A\u201d message=\u201dbash code\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n[ad type=\u201dbanner\u201d]<\/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}]}}