{"id":819,"date":"2021-11-20T15:37:38","date_gmt":"2021-11-20T09:37:38","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=819"},"modified":"2021-11-20T15:37:38","modified_gmt":"2021-11-20T09:37:38","slug":"centos-6-yum-error-all-mirror-urls-are-not-using-ftp-https-or-file","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/centos-6-yum-error-all-mirror-urls-are-not-using-ftp-https-or-file.html","title":{"rendered":"CENTOS 6 : YUM ERROR : ALL MIRROR URLS ARE NOT USING FTP, HTTP[S] OR FILE"},"content":{"rendered":"\n<p>If you are still using CentOS 6, and trying to update the system using the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum update -y<\/pre>\n\n\n\n<p>You probably end up with the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Loaded plugins: fastestmirror, refresh-packagekit, security\nSetting up Update Process\nDetermining fastest mirrors\nYumRepo Error: All mirror URLs are not using ftp, http[s] or file.\nEg. Invalid release\/repo\/arch combination\/\nremoving mirrorlist with no valid mirrors: \/var\/cache\/yum\/x86_64\/6\/base\/mirrorlist.txt\nError: Cannot find a valid baseurl for repo: base<\/pre>\n\n\n\n<p>The error is coming up because CentOS 6 has now hit the end of life, and the URLs are moved to centos vault. Now to update the CentOS, you would need to replace the URLs. <\/p>\n\n\n\n<p><strong>How to Fix<\/strong><\/p>\n\n\n\n<p>To fix the error, you need to replace your CentOS-base.repo file. Open up the following file using nano:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano \/etc\/yum.repos.d\/CentOS-Base.repo<\/pre>\n\n\n\n<p>Now, replace the full code using the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[base]\nname=CentOS-$releasever - Base\n# mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=os&amp;infra=$infra\n# baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\/os\/$basearch\/\nbaseurl=https:\/\/vault.centos.org\/6.10\/os\/$basearch\/\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-6\n\n# released updates\n[updates]\nname=CentOS-$releasever - Updates\n# mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=updates&amp;infra=$infra\n# baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\/updates\/$basearch\/\nbaseurl=https:\/\/vault.centos.org\/6.10\/updates\/$basearch\/\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-6\n\n# additional packages that may be useful\n[extras]\nname=CentOS-$releasever - Extras\n# mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&amp;arch=$basearch&amp;repo=extras&amp;infra=$infra\n# baseurl=http:\/\/mirror.centos.org\/centos\/$releasever\/extras\/$basearch\/\nbaseurl=https:\/\/vault.centos.org\/6.10\/extras\/$basearch\/\ngpgcheck=1\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-CentOS-6<\/pre>\n\n\n\n<p>Notice, how we replaced mirror.centos.org to valut.centos.org in the repo file.<\/p>\n\n\n\n<p>Now, clean the yum, and update<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum clean all\nyum update -y<\/pre>\n\n\n\n<p>You should be good to go now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are still using CentOS 6, and trying to update the system using the following command: You probably end up with the following: The error is coming up because CentOS 6 has now hit the end of life, and the URLs are moved to centos vault. Now to update the CentOS, you would need &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/centos-6-yum-error-all-mirror-urls-are-not-using-ftp-https-or-file.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CENTOS 6 : YUM ERROR : ALL MIRROR URLS ARE NOT USING FTP, HTTP[S] OR FILE&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[295,12],"tags":[235,613,612],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/819"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=819"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/819\/revisions"}],"predecessor-version":[{"id":820,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/819\/revisions\/820"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}