Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist — Centos 8 Fix

<h1>Fix Failed to download metadata for repo</h1> <p>CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. that&rsquo;s means CentOS 8 will no longer receive development resources from the official CentOS project.</p> <p>After Dec 31st, 2021, if you need to update your&nbsp;<strong>CentOS</strong>, you need to change the mirrors to&nbsp;<a href="https://vault.centos.org/" rel="noopener ugc nofollow" target="_blank">vault.centos.org</a>&nbsp;where they will be archived permanently.</p> <p><strong><em>So just follow the steps below to do that</em></strong></p> <ul> <li>Go to the<strong>&nbsp;/etc/yum.repos.d/</strong>&nbsp;directory.</li> </ul> <pre> cd /etc/yum.repos.d/</pre> <ul> <li>Run the below commands to hash the mirror-list in all&nbsp;<strong>yum.repos.d&nbsp;</strong>files then replace the existed Baseurl with the&nbsp;<strong>vault.centos.org</strong></li> </ul> <p><a href="https://yegorshytikov.medium.com/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal-mirrorlist-no-959768e5f8e5"><strong>Read More</strong></a></p>