Error: Failed to download metadata for repo 'baseos' / 'appstream' - Centos 8

Linode Staff

I'm receiving the following error when I run yum update:

  - 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?

5 Replies

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:

https://www.centos.org/centos-linux-eol/

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:

  1. Open your CentOS-Linux-AppStream.repo and CentOS-Linux-BaseOS.repo files in vim or nano.
  2. Comment out:

CentOS-Linux-BaseOS.repo
#baseurl=http://mirrors.linode.com/$contentdir/$releasever/BaseOS/$basearch/os/

CentOS-Linux-AppStream.repo
#baseurl=http://mirrors.linode.com/$contentdir/$releasever/AppStream/$basearch/os/

  1. Add the following line to each respective file:

CentOS-Linux-BaseOS.repo
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/

CentOS-Linux-AppStream.repo
baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/

  1. Save each file and exit.
  2. Run yum update again.

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.

I also required to reboot the VM. Not sure if this was just a coincidence.
Thanks

Hi, It works for me (yum update). Thanks

For me, with a fresh Linode image install of CentOS Stream 9 Disk, I had to log in an run:

dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release

as documented via https://docs.fedoraproject.org/en-US/epel/
along with a

yum update

and reboot, I was done and went on to installing Longview

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct