{"id":2518,"date":"2023-07-09T14:51:35","date_gmt":"2023-07-09T12:51:35","guid":{"rendered":"https:\/\/itsimple.info\/?p=2518"},"modified":"2023-07-09T14:52:29","modified_gmt":"2023-07-09T12:52:29","slug":"how-to-resolve","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2518","title":{"rendered":"How to resolve CentOS Error: No URLs in mirrorlist &#8230;.."},"content":{"rendered":"\n<p>If you are using CentOS 8, you may have noticed that installing packages with yum does not work any longer and often results in an error message like this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Error: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare internal mirrorlist: No URLs in mirrorlist<\/p>\n<\/blockquote>\n\n\n\n<p>Furthermore, this error may also occur when we use Docker container images based on CentOS 8.<\/p>\n\n\n\n<p>This error started occurring on January 31, 2022,&nbsp; as the CentOS team removed all CentOS 8 packages from the official mirrors. These packages have been moved to this <a href=\"https:\/\/vault.centos.org\">link<\/a>.<\/p>\n\n\n\n<p>We can easily resolve the \u201cCentOS Error: No URLs in mirrorlist\u201d by migrating to CentOS Stream 8. However, if that is not a possibility at the moment, our experts have a quick solution:<\/p>\n\n\n\n<p>We have to update the repos in \/etc\/yum.repos.d in order to use vault.centos.org rather than mirror.centos.org . We can do this with these commands:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn-bhdil.nitrocdn.com\/isrDVIFCpCXbHHPoNruCoFKRiVumSNxS\/assets\/images\/optimized\/rev-7eef656\/bobcares.com\/wp-content\/uploads\/2022\/12\/CentOS-Error-No-URLs-in-mirrorlist-2-776x.png\" alt=\"CentOS Error No URLs in mirrorlist\" class=\"wp-image-337715\"\/><\/figure>\n<\/div>\n\n\n<pre class=\"wp-block-preformatted\">sudo sed -i -e \"s|mirrorlist=|#mirrorlist=|g\" \/etc\/yum.repos.d\/CentOS-*\nsudo sed -i -e \"s|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g\" \/etc\/yum.repos.d\/CentOS-*<\/pre>\n\n\n\n<p>In other words, we are replacing the base URL. Although this will resolve the error for now, we will not receive any further updates for CentOS 8. Our experts recommend upgrading to the Stream version sooner rather than later.<\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-large-font-size\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you are using CentOS 8, you may have noticed that installing packages with yum does not work any longer and often results in an error message like this: Error: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare internal mirrorlist: No URLs in mirrorlist Furthermore, this error may also occur when we use Docker [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,21,4,12],"tags":[],"class_list":["post-2518","post","type-post","status-publish","format-standard","hentry","category-linux","category-operating-systems","category-tech","category-tutorials"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2518"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2518\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}