问题描述:CentOS8.2 yum安装时提示AppStream错误

在CentOS8.2上使用yum安装时遇到AppStream错误。解决方法包括更换国内的yum源,如阿里云或腾讯云,并清除缓存。错误源于CentOS-AppStream.repo未更新。通过查看更新后的CentOS-Base.repo,将内容复制到CentOS-AppStream.repo中,注释原有内容,从而修复问题。

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

问题描述: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

解决办法:

  1. 更换国内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
  1. 清除之前的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 文件已删除
  1. 建立新的缓存
[root@tefuirluo ~]# yum makecache
Repository AppStream is listed more than once in the configuration
Repository ext
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tefuir_luo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值