Score:0

Couldn't resolve host name for http://vault.centos.org/centos/8/AppStream/

cn flag

Every time I run a command on my virtual server, I get the following error centos8

[root@servers03 ~]# dnf install epel-release CentOS Linux 8 - AppStream 0.0 B/s | 0 B
00:00 Errors during downloading metadata for repository 'appstream':

[root@servers03 ~]# yum update -y CentOS Linux 8 - AppStream
0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'appstream':

I tried to use the following commands to fix the error, but it didn't work

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-*
Alexander Tolkachev avatar
sa flag
Has you executed `yum clean all` after implementing changes?
Score:0
fr flag

Are you by any chance on IPv6 only VM? If yes - you MUST point the VM to external, dual stack resolver as centos.org nameservers are IPv4 only (which is a big pity given the fact that vault.centos.org is dual-stack).

Score:0
pl flag

Based on [Could not resolve host: vault.centos.org] it looks like there is some issue with DNS resolver.

Try run the following command: dig +short vault.centos.org. It should return a couple of addresses.

If no, try another domain: dig +short redhat.com. In case this command also returns nothing or report an error it means your resolver doesn't know anything about these domains.

So, the easiest option is to temporary add public DNS:

sudo echo "nameserver 8.8.8.8 \nnameserver 8.8.4.4" >> /etc/resolv.conf

After update you may manually delete them or just reboot, resolv.conf should be generated from interface config.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.