当前位置: 首页 > news >正文

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

这种情况会出现在你配置多个源的时候,直接用官网上源的配置方法配置多个源不做修改就会出现这个问题

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等出现了不只一次,所以我们很自然的想到观察一下这些源的相关配置

回想到我们在配置源的时候只用到了.repo结尾的文件,所以我们从自己配置的.repo 文件中寻找出路

执行下列指令

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

你会发现类似以下输出(因为我的fedora-updates.repo是阿里的所以你的输出会和我的有一些区别)

[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文件时可以发现同样的输出,这便是症结所在

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

[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等,如果你还有其他源也可以这样修改就行了

全部修改完毕后更新一下就好

 sudo dnf makecache 

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

 

转载于:https://www.cnblogs.com/mrway/p/9626255.html

相关文章:

  • MATLAB函数flow
  • [Python3网络爬虫开发实战] 5.3-非关系型数据库存储
  • power shell测试wmi
  • 微信携手第三方再造新平台 - 公众号第三方平台介绍
  • 这次偶遇宁可不要,也要把秘诀送给你们
  • 信息安全领域内的风险损失价值估算
  • CodingGit专题
  • [Redis]Redis高级特性的配置及使用
  • spring 单机和集群配置mqzookeeperredis
  • Iphone CodeSign error: no provisioning profile at path 错
  • CSS 译文:理解CSS中的块级格式化上下文
  • 2018年高教社杯全国大学生数学建模竞赛B题解题思路
  • storm记录--1-- 实时计算系统
  • Android优雅地处理按钮重复点击
  • 生产者消费者问题 伪代码和C语言多线程实现
  • Android框架之Volley
  • C# 免费离线人脸识别 2.0 Demo
  • Mac转Windows的拯救指南
  • markdown编辑器简评
  • React+TypeScript入门
  • Spring思维导图,让Spring不再难懂(mvc篇)
  • vue和cordova项目整合打包,并实现vue调用android的相机的demo
  • 普通函数和构造函数的区别
  • 我感觉这是史上最牛的防sql注入方法类
  • 详解移动APP与web APP的区别
  • 掌握面试——弹出框的实现(一道题中包含布局/js设计模式)
  • RDS-Mysql 物理备份恢复到本地数据库上
  • 新海诚画集[秒速5センチメートル:樱花抄·春]
  • ​创新驱动,边缘计算领袖:亚马逊云科技海外服务器服务再进化
  • ​总结MySQL 的一些知识点:MySQL 选择数据库​
  • #pragma pack(1)
  • #快捷键# 大学四年我常用的软件快捷键大全,教你成为电脑高手!!
  • (Ruby)Ubuntu12.04安装Rails环境
  • (附源码)ssm智慧社区管理系统 毕业设计 101635
  • (附源码)计算机毕业设计SSM基于java的云顶博客系统
  • (黑马C++)L06 重载与继承
  • (学习日记)2024.01.09
  • (一)WLAN定义和基本架构转
  • (译) 理解 Elixir 中的宏 Macro, 第四部分:深入化
  • (转)C#开发微信门户及应用(1)--开始使用微信接口
  • (转)chrome浏览器收藏夹(书签)的导出与导入
  • (转)h264中avc和flv数据的解析
  • (转)shell调试方法
  • ***linux下安装xampp,XAMPP目录结构(阿里云安装xampp)
  • .NET CF命令行调试器MDbg入门(四) Attaching to Processes
  • .NET微信公众号开发-2.0创建自定义菜单
  • @ModelAttribute使用详解
  • [ vulhub漏洞复现篇 ] AppWeb认证绕过漏洞(CVE-2018-8715)
  • [20161214]如何确定dbid.txt
  • [AutoSar]BSW_Com02 PDU详解
  • [bzoj 3534][Sdoi2014] 重建
  • [CISCN2019 华东北赛区]Web2
  • [HXPCTF 2021]includer‘s revenge
  • [IE编程] IE8 新增的C++开发接口
  • [IE编程] 如何获得IE版本号