问题描述:CentOS8.2 yum安装时提示AppStream
错误
Errors during downloading metadata for repository 'AppStream':
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)
错误:Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
解决办法:
- 更换国内yum源,建议更换为阿里云yum或者腾讯云yum
# 此处更换的为腾讯云
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.3
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
- 清除之前的yum缓存
[root@tefuirluo ~]# yum clean all
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository fasttrack is listed more than once in the configuration
27 文件已删除
- 建立新的缓存
[root@tefuirluo ~]# yum makecache
Repository AppStream is listed more than once in the configuration
Repository ext