Skip to content

Instantly share code, notes, and snippets.

@DevSecOpsGuy
Last active April 2, 2022 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DevSecOpsGuy/cffd69321e56ae1fa4f2bc88c3487d3e to your computer and use it in GitHub Desktop.
Save DevSecOpsGuy/cffd69321e56ae1fa4f2bc88c3487d3e to your computer and use it in GitHub Desktop.
Fix Failed to download metadata for CentOS Linux 8 End Of Life (EOL) repo
[root@localhost ~]# yum update
CentOS-8 - AppStream 70 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
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-*
yum clean all
yum repolist
yum update -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment