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

Posted lishuangquan1987

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

解决办法:

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

以上是关于CentOS 8 AppStream报错AppStream is listed more than once in the configuration的主要内容,如果未能解决你的问题,请参考以下文章

解决centos8 yum 安装报错 AppStream

Centos8 yum 报错 Error: Failed to download metadata for repo 'appstream': Cannot prepare inter

centos下载报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlis

Linux——CentOS8-安装软件时报错

Linux——CentOS8-安装软件时报错

Centos 8 软件管理