修复CentOS升级过程中出现的package is a duplicate with的错误

服务器CentOS 7升级过程中出现中断,再次运行yum update则出现大量的包重复问题。

错误内容大致如下:

glibc-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-2.12-1.107.el6_4.4.x86_64
glibc-common-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-common-2.12-1.107.el6_4.4.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-devel-2.12-1.107.el6_4.4.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64 has missing requires of glibc-headers = ('0', '2.12', '1.107.el6_4.5')
iputils-20071127-17.el6_4.2.x86_64 is a duplicate with iputils-20071127-17.el6_4.x86_64
nspr-4.9.5-2.el6_4.x86_64 is a duplicate with nspr-4.9.2-1.el6.x86_64
nss-3.14.3-4.el6_4.x86_64 is a duplicate with nss-3.14.0.0-12.el6.x86_64
nss-softokn-3.14.3-3.el6_4.x86_64 is a duplicate with nss-softokn-3.12.9-11.el6.x86_64
nss-util-3.14.3-3.el6_4.x86_64 is a duplicate with nss-util-3.14.0.0-2.el6.x86_64
tzdata-2013g-1.el6.noarch is a duplicate with tzdata-2013c-2.el6.noarch
2:xinetd-2.3.14-39.el6_4.x86_64 is a duplicate with 2:xinetd-2.3.14-38.el6.x86_64

解决:

1,需要安装yum-utils

yum install yum-utils -y

2,清除yum缓存

yum clean all

3,列出重复的包

package-cleanup --dupes

4,删除重复的包

package-cleanup --cleandupes --removenewestdupes

5,清除可能存在的损坏包

package-cleanup --problems

6,继续升级

yum update -y

处理完成。

转载于:https://my.oschina.net/u/1261643/blog/1840518

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值