Error: Failed to download metadata for repo ‘AppStream‘

在尝试使用yum安装软件时遇到了404错误,问题源于AppStream源无法下载元数据。解决方案包括删除并替换AppStream源,下载新的阿里云CentOS和EPEL源,清除yum缓存并生成新缓存。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用yum安装时出现如下错误:

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)
    Error: Failed to download metadata for repo ‘AppStream’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

1.删除AppStream源

rm -f /etc/yum.repos.d/CentOS-AppStream.repo

2.取消并备份旧yum源(可直接删除)

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

3.下载源

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
curl -o /etc/yum.repos.d/CentOS-epel.repo https://mirrors.aliyun.com/repo/epel-archive-8.repo

4.清除yum缓存

yum clean all

5.生成新缓存

 yum makecache
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值