{"id":11,"date":"2023-01-17T03:43:08","date_gmt":"2023-01-17T03:43:08","guid":{"rendered":"https:\/\/smartsource.com.sg\/blog\/?p=11"},"modified":"2023-01-17T03:53:03","modified_gmt":"2023-01-17T03:53:03","slug":"failed-to-download-metadata-for-repo-appstream-centos","status":"publish","type":"post","link":"https:\/\/smartsource.com.sg\/blog\/index.php\/2023\/01\/17\/failed-to-download-metadata-for-repo-appstream-centos\/","title":{"rendered":"Failed to download metadata for repo \u2018AppStream\u2019 [CentOS]"},"content":{"rendered":"\n<p>When you run &#8216;yum update&#8217; in a CentOS machine, you might get this error. You are probably doing this on a CentOS 8.2 machine or a VM that you just created using an old centos iso image. Then you get this error like below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@smartsource1 ~]# yum update\nCentOS-8 - AppStream 70 B\/s | 38 B 00:00\nError: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist<\/pre>\n\n\n\n<p>This is because on 31st Dec 2021, CentOS 8 had reached its EOL. So you can either upgrade to CentOS Stream or you can point your yum repository to the archives by executing the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/yum.repos.d\/\r\nsed -i 's\/mirrorlist\/#mirrorlist\/g' \/etc\/yum.repos.d\/CentOS-*\r\nsed -i 's|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g' \/etc\/yum.repos.d\/CentOS-*\r\nyum update -y<\/code><\/pre>\n\n\n\n<p>Now your yum update should work fine as we have pointed the repos to the archives.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you run &#8216;yum update&#8217; in a CentOS machine, you might get this error. You are probably doing this on a CentOS 8.2 machine or a VM that you just&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[12],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-question-and-answers","tag-centos-7"],"_links":{"self":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":1,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/11\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}