to be
a problem slover

Repository base is listed more than once in the configuration解决办法

概述

使用yum check-update命令时,提示“Repository base is listed more than once in the configuration”

$ yum check-update
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.ustc.edu.cn

原因

/etc/yum.repos.d目录里面的源重复了

$ cd /etc/yum.repos.d/ && ls
CentOS-Base-official.repo  CentOS-Debuginfo.repo  CentOS-Sources.repo                                        docker-ce.repo     epel-offical.repo
CentOS-Base.repo           CentOS-fasttrack.repo  CentOS-Vault.repo                                          elrepo.repo        epel-testing.repo
CentOS-CR.repo             CentOS-Media.repo      _copr:copr.fedorainfracloud.org:librehat:shadowsocks.repo  epel-alibaba.repo

其中CentOS-Base-official.repo和CentOS-Base.repo重复,epel-offical.repo和epel-alibaba.repo重复,因为之前我引入了alibaba的源,让下载速度更快一点,同时将官方源重命名保存,所以会有重复。

解决办法

将重复的源移除就好

$ rm CentOS-Base-official.repo epel-offical.repo

再执行yum check-update就没有提示了

$ yum check-update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
赞(4) 打赏
欢迎转载,注明出处:刘世明的博客 » Repository base is listed more than once in the configuration解决办法

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏