Repository updates is listed more than once in the configuration问题的解决方法

这种状况会出如今你配置多个源的时候,直接用官网上源的配置方法配置多个源不作修改就会出现这个问题url

Repository updates is listed more than once in the configuration Repository updates-debuginfo is listed more than once in the configuration Repository updates-source is listed more than once in the configuration Repository fedora is listed more than once in the configuration Repository fedora-debuginfo is listed more than once in the configuration Repository fedora-source is listed more than once in the configuration

 

 缘由也很简单,从上面的提示就能够看出来在某个配置(configuration)文件里updates, updates-debuginfo , updates-source等出现了不仅一次,因此咱们很天然的想到观察一下这些源的相关配置spa

回想到咱们在配置源的时候只用到了.repo结尾的文件,因此咱们从本身配置的.repo 文件中寻找出路debug

执行下列指令code

 cat /etc/yum.repos.d/fedora-updates.repo blog

你会发现相似如下输出(由于个人fedora-updates.repo是阿里的因此你的输出会和个人有一些区别)ip

[updates] name=Fedora $releasever - $basearch - Updates - aliyun failovermethod=priority baseurl=http://mirrors.aliyun.com/fedora/updates/$releasever/$basearch/  #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch  enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch   [updates-debuginfo] name=Fedora $releasever - $basearch - Updates - Debug -aliyun failovermethod=priority baseurl=http://mirrors.aliyun.com/fedora/updates/$releasever/$basearch/debug/  #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch  enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch   [updates-source] name=Fedora $releasever - Updates Source - aliyun failovermethod=priority baseurl=http://mirrors.aliyun.com/fedora/updates/$releasever/SRPMS/  #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch  enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch 

 

观察每一段的开头就能够发现,每一段开头中括号里的内容就是上述列出的单词,当你在查看其余*-updates.repo文件时能够发现一样的输出,这即是症结所在it

解决的方法也很简单就是把这些段落开头的中括号里的内容修改一下,好比个人中科大源的更新的配置(fedora-ustc-updates.repo)io

[updates-ustc] name=Fedora $releasever - $basearch - Updates - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/ #metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 repo_gpgcheck=0 type=rpm gpgcheck=1 metadata_expire=6h gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False [updates-ustc-debuginfo] name=Fedora $releasever - $basearch - Updates - Debug - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/Everything/$basearch/debug/tree/ #metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch enabled=0 repo_gpgcheck=0 type=rpm gpgcheck=1 metadata_expire=6h gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False [updates-ustc-source] name=Fedora $releasever - Updates Source - ustc failovermethod=priority baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/Everything/source/tree/ #metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch enabled=0 repo_gpgcheck=0 type=rpm gpgcheck=1 metadata_expire=6h gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False

 

只是把段落开头的中括号里的updates改成updates-ustc 把updates-debuginfo改成updates-ustc-debuginfo等,若是你还有其余源也能够这样修改就好了class

所有修改完毕后更新一下就好sed

 sudo dnf makecache 

另外中科大源的更新有点小问题,下一篇文章会记录下来。

相关文章
相关标签/搜索