关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

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

发布时间:2023-03-06 14:05:13
1491984010112764.jpg

错误提示:

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全部清除。



/template/Home/8a/PC/Static