Issue w/ Linux Challenge #2

Hello, I am having a bit of trouble with Linux Challenge #2.

When I am trying to install nginx server using:

yum install nginx

I am receiving the below message:

Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]

It almost seems like the virtual machine does not have access to the internet. Has anybody else experienced the same issue?

Hello @jstafford3344
Can you please try to ping 8.8.8.8 if the ping command working fine and the machine reached the internet so try to fix this error, by changing the repo URL pointing from the official CentOS URL to vault.centos.org using the below commands.

cd /etc/yum.repos.d/

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

Once the mirror is changed and updated, we can now try to update again by using dnf update command This time it works fine as expected. Alternatively

1 Like

Hi , I am having same issueā€¦ I have tried the above mentioned changeā€¦ I didnt work for meā€¦
CentOS Stream 8 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository ā€˜appstreamā€™:

Iā€™m having the same issue. (after updating mirror.centos.org to vault.centos.org and adding a 8.8.8.8 as a nameserver)

rebooting the server does ā€œfixā€ the problem. but it flushes the go-app directory and breaks the lab. (the ā€œcheckā€ scripts no longer work)

1 Like