博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
yum安装故障
阅读量:7172 次
发布时间:2019-06-29

本文共 2131 字,大约阅读时间需要 7 分钟。

$ sudo yum list

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 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
File contains parsing errors: file:///etc/yum.repos.d/fedora.repo

..................

 

使用yum 安装软件(或者执行yum list)时报以上错误,从错误提示中可以看出是一些插件和包被重复设置了。

猜测可能是因为yum源(我的yum源有很多个)之间重复设置了某个包的安装地址。于是把所有的yum源都改个名字,把.repo后缀改成.repo.bk后缀。保留一个比较常用的:

$ su root

#cd /etc/yum.repos.d

# ls

CentOS7-Base-163.repo     CentOS-CR.repo         CentOS-Media.repo    fedora.repo
CentOS-Base.repo       CentOS-Debuginfo.repo  CentOS-Sources.repo
CentOS-Base-sohu.repo CentOS-fasttrack.repo CentOS-Vault.repo

#rename .repo .repo.bk *.repo

#mv CentOS7-Base-163.repo.bk CentOS7-Base-163.repo

# ls

CentOS7-Base-163.repo     CentOS-CR.repo.bk         CentOS-Media.repo.bk    fedora.repo.bk
CentOS-Base.repo.bk       CentOS-Debuginfo.repo.bk  CentOS-Sources.repo.bk
CentOS-Base-sohu.repo.bk  CentOS-fasttrack.repo.bk  CentOS-Vault.repo.bk
#yum list

ant-commons-logging.noarch                                1.9.2-9.el7                          base     

ant-commons-net.noarch                                    1.9.2-9.el7                          base     
ant-contrib.noarch                                        1.0-0.23.b3.el7                      base     
ant-contrib-javadoc.noarch                                1.0-0.23.b3.el7                      base     
ant-javadoc.noarch                                        1.9.2-9.el7                          base     
ant-javamail.noarch                                       1.9.2-9.el7                          base     
ant-jdepend.noarch                                        1.9.2-9.el7                          base     
ant-jmf.noarch                                            1.9.2-9.el7                          base     
ant-jsch.noarch                                           1.9.2-9.el7                          base     
ant-junit.noarch                                          1.9.2-9.el7                          base     
ant-manual.noarch                                         1.9.2-9.el7                          base     
ant-swing.noarch                                          1.9.2-9.el7                          base     
ant-testutil.noarch                                       1.9.2-9.el7                          base     
antlr-C++.i686                                            2.7.7-30.el7                         base     
antlr-C++.x86_64                                          2.7.7-30.el7                         base     
antlr-C++-doc.noarch                                      2.7.7-30.el7                         base     
antlr-javadoc.noarch                                      2.7.7-30.el7                         base     
antlr-manual.noarch                                       2.7.7-30.el7                         base 

........

这样的话,原来的错误就解决了。如果有些包安装不成功,也不在yum list的列表里面,就配置一个和所需包对应的yum源吧

 

转载于:https://www.cnblogs.com/flyfish919/p/7300860.html

你可能感兴趣的文章
广州.NET微软技术俱乐部微信群各位技术大牛的blog
查看>>
《Redis设计与实现》之第九章:数据库
查看>>
10月10日学习内容整理:socketserver模块,ftp作业讲解
查看>>
P1352 没有上司的舞会
查看>>
Bzoj 1648: [Usaco2006 Dec]Cow Picnic 奶牛野餐 深搜,bitset
查看>>
关于《淘宝技术这十年》
查看>>
c#事件机制
查看>>
冒泡排序
查看>>
Sublime一键预览
查看>>
C#使用log4net记录日志
查看>>
halcon
查看>>
servlet过滤器
查看>>
maven向本地仓库导入jar包(处理官网没有的jar包)
查看>>
input标签元素,value属性取值问题,赋值
查看>>
Photoshop快捷键大全
查看>>
删除数据库
查看>>
python第二周
查看>>
c易错
查看>>
答复功能改进建议
查看>>
(七)UML之用例图
查看>>