Failed to download metadata for repo ‘AppStream‘ Error: Failed to download metadata for repo ‘AppStr

1、Centos8执行dnf group install "Development Tools"报错:

Failed to set locale, defaulting to C.UTF-8
CentOS-8 - AppStream                                                                     33  B/s |  38  B     00:01
Failed to download metadata for repo 'AppStream'
Error: Failed to download metadata for repo 'AppStream'

2、解决方法

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


curl -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

yum clean all

yum makecache

3、验证

yum install wget –y

你可能感兴趣的:(centos8,Development)