Failed to download metadata for repo 'base'

Issues related to applications and software problems and general support
Post Reply
sara.hann@telos.com
Posts: 1
Joined: 2021/10/01 04:38:37

Failed to download metadata for repo 'base'

Post by sara.hann@telos.com » 2021/10/01 04:43:07

Please, how can I connect to the Centos 8 BaseOS repo? I am getting errors of no repomd.xml file. Also, I cannot find the RPM-GPG-KEY-CentOS-8 , like the ones available for 7 and earlier. below is the error I get and my entry in the .repo file. thanks in advance for your help:

Errors during downloading metadata for repository 'base':
CentOS-8-Base 35 kB/s | 7.6 kB 00:00
Errors during downloading metadata for repository '8base':
- Status code: 404 for http://mirror.centos.org/centos/8/BaseO ... repomd.xml (IP: 208.74.123.85)
Error: Failed to download metadata for repo '8base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried


sudo vi /etc/yum.repos.d/redhat.repo
[base]
name=CentOS-8-Base
#mirrorlist=http://mirrorlist.centos.org/?release=7 ... 64&repo=os
baseurl=http://mirror.centos.org/centos/8/BaseOS/x86_64/
enabled=0
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8
priority=1

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Failed to download metadata for repo 'base'

Post by TrevorH » 2021/10/01 08:00:21

You appear to have tried to adapt a CentOS 7 repo file to 8 and they are not directly comparable. The 8 version should look like this:

Code: Select all

[baseos]
name=CentOS Linux $releasever - BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Once you have that in place you should probably yum reinstall centos-linux-repos.noarch and then check the various /etc/yum.repos.d/*.repo.rpmnew files as those are the ones the newly reinstalled package will have supplied.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply