Error: Failed to download metadata for repo 'baseos' / 'appstream' - Centos 8
I'm receiving the following error when I run
- Status code: 404 for http://mirrors.linode.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 2600:3c00:1::68c8:17a2) Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
How can I resolve this?
The reason you're seeing this error is because CentOS 8 went EOL 12/31/21 (deadline extended to today - 1/31/22), and the official repo was moved to vault.centos.org. Therefore, we do not keep mirrors for this anymore.
The following page provides more information on this:
Therefore, you may want to consider using CentOS 7 (EOL 2024-06-30) or CentOS Stream 8 (EOL 2024-05-31).
While it's not recommended, if you prefer to continue using CentOS 8 for the time being, you can do the following:
- Open your
CentOS-Linux-BaseOS.repofiles in vim or nano.
- Comment out:
- Add the following line to each respective file:
- Save each file and exit.
We will continue to offer Centos 8 for six months after EOL and will mark the Centos 8 distro as deprecated soon so as not to cause further confusion.
Open your CentOS-Linux-AppStream.repo and CentOS-Linux-BaseOS.repo files in vim or nano.
Just to add these files are located in /etc/yum.repos.d (took me a while to find them). This fixed the problem.