Fixing “No URLs in Mirrorlist” Error on CentOS 8 Stream

The error looks like this:

Error: Error downloading packages:
No URLs in mirrowlist

Right after you answer “y” to yum update and get a package list. “No URLs in mirrorlist,” apparently occurs because CentOS 8 has reached its End-Of-Life (EOL) and the official mirrors no longer host the packages. We can fix this by updating your repository files to point to the vault where the CentOS 8 packages are now stored. Open a root terminal, or go as root, and copy this:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

After that, run yum update again. It will work.

BTW I knew CentOS 8 stream was going to be discontinued. However I was not expecting to face this so soon. Back to square zero, I guess. We’ll see which distro we choose now!

Leave a comment