Errors during downloading metadata for repository ‘base‘ #
CentOS-8 - Base - mirrors.aliyun.com 0.0 B/s | 0 B 00:47
Errors during downloading metadata for repository 'base':
- Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 120.39.197.216)
- Curl error (7): Couldn't connect to server for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Failed to connect to mirrors.aliyuncs.com port 80: 拒绝连接]
错误:为仓库 'base' 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Centos8 官方源下架,因此需要改一下
# 进入yum目录
cd /etc/yum.repos.d
# 删除目录下所有文件(注意完整复制,不要漏了那个点)
rm -rf ./*
# 安装正确的源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
# 生成缓存
yum makecache