How to fix error “Failed to download metadata for repo AppStream… in CentOS”?
How to fix error “Failed to download metadata for repo AppStream… in CentOS”?
When you run yum update, you may see error said “Failed to download metadata for repo AppStream…”, following is how to fix such error:
cd /etc/yum.repos.d/
run the following commands to modify some repo files:
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-* dnf update then you can run yum update or yum --security update to update only security patches.