這種狀況會出如今你配置多個源的時候,直接用官網上源的配置方法配置多個源不作修改就會出現這個問題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
另外中科大源的更新有點小問題,下一篇文章會記錄下來。