错误提示:
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).
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
这种情况是由于在使用yum命令安装程序时,强制退出yum或者yum异常退出造成的,再次使用yum时就会提示上述的错误。
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
解决方法:
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
1、安装yum-complete-transaction,这个工具是在yum-utils这个包里面,所以,需要先安装yum-utils才能使用yum-complete-transaction
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
[root@localhost ~]# yum -y install yum-utils
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
2、清理缓存
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
[root@localhost ~]# yum clean all
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
3、执行清理未完成事物
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
[root@localhost ~]# yum-complete-transaction --cleanup-only
文章源自小柒网-https://www.yangxingzhen.cn/8655.html
注意:运行上述命令需要root权限。yum会把下载的软件包和header存储在cache中,而不会自动删除。可用yum clean headers清除header,yum clean packages清除下载的rpm包,yum clean all全部清除。文章源自小柒网-https://www.yangxingzhen.cn/8655.html
Linux