侧边栏壁纸
博主头像
Tony's Blog博主等级

行动起来,coding

  • 累计撰写 83 篇文章
  • 累计创建 58 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

CentOS 8 AppStream报错AppStream is listed more than once in the configuration

Tony
2024-02-20 / 0 评论 / 0 点赞 / 10 阅读 / 2690 字

CentOS 8 AppStream报错AppStream is listed more than once in the configuration

现象

使用命令 yum install git 时,报如下错误:

[root@centos8 ~]# yum install git
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
上次元数据过期检查:0:04:46 前,执行于 2022年06月18日 星期六 13时04分03秒。
未找到匹配的参数: git
错误:没有任何匹配: git

5-zxfv.png

解决办法:

1.备份

cd /etc/yum.repos.d && mkdir bak  && mv *.repo ./bak

2.换阿里云源

有些教程给出的换源网址已经不能再使用,建议查看官网

https://developer.aliyun.com/mirror/centos

2022年6月如下方式有效

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

3.清理,生成缓存

yum clean all
yum makecache

0

评论区