Centos 7使用Yum更新软件提示有事物未完成的解决办法

小辉助手 Linux评论303字数 212阅读0分42秒阅读模式

错误提示:

There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).

这种情况是由于在使用yum命令安装程序时,强制退出yum或者yum异常退出造成的,再次使用yum时就会提示上述的错误。

解决方法:

1、安装yum-complete-transaction,这个工具是在yum-utils这个包里面,所以,需要先安装yum-utils才能使用yum-complete-transaction

[root@localhost ~]# yum -y install yum-utils

2、清理缓存

[root@localhost ~]# yum clean all

3、执行清理未完成事物

[root@localhost ~]# yum-complete-transaction --cleanup-only

注意:运行上述命令需要root权限。yum会把下载的软件包和header存储在cache中,而不会自动删除。可用yum clean headers清除header,yum clean packages清除下载的rpm包,yum clean all全部清除。

若文章图片、下载链接等信息出错,请在评论区留言反馈,博主将第一时间更新!如本文“对您有用”,欢迎随意打赏,谢谢!

微信号
微信扫一扫,加我!
weinxin
微信公众号
微信扫一扫,关注我!
weinxin
小辉助手
  • 本文由 小辉助手 发表于 2023年2月14日 15:02:35
  • 声明:本站所有文章,如无特殊说明或标注,本站文章均为原创。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。转载请务必保留本文链接:https://www.yangxinghui.cn/1391.html
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

拖动滑块以完成验证