centos yum删除重复包

在尝试使用yum update时遇到了TransactionCheckError,错误显示systemtap的多个版本之间的文件存在冲突。解决方法包括检查已安装的systemtap相关包,删除低版本的包,并使用yum-utils清理重复和损坏的包,以及旧的系统包。
摘要由CSDN通过智能技术生成

    我在执行yum update的时候碰到以下错误

Transaction Check Error:
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-runtime-2.5-5.el6.x86_64
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-client-2.5-5.el6.x86_64
  file /usr/share/locale/en/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64
  file /usr/share/locale/pl/LC_MESSAGES/systemtap.mo from install of systemtap-2.9-4.el6.x86_64 conflicts with file from package systemtap-devel-2.5-5.el6.x86_64

    先用以下命令查看装有多少个不同的包:

rpm -qa | grep systemtap

    然后用以下的命令删除重复的低版本的包:

rpm -e --allmatches --nodeps systemtap-runtime-2.5-5.el6.x86_64
rpm -e --allmatches --nodeps systemtap-devel-2.5-5.el6.x86_64

    查看以及清除所有的重复包:

yum install yum-utils
yum-complete-transaction --cleanup-only
#清除可能存在的重复包
package-cleanup --dupes
#清除可能存在的损坏包
package-cleanup --problems
#清除重复包的老版本:
package-cleanup --cleandupes

    删除旧的系统包:

package-cleanup --oldkernels
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Z小偉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值