CentOS 8 AppStream报错Repository AppStream is listed.......
现象
使用命令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
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
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »