Centos 7使用Yum更新软件提示有事物未完成的解决办法
错误提示: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
# yum -y install yum-utils
2、清理缓存
# yum clean all
3、执行清理未完成事物
# yum-complete-transaction --cleanup-only
注意:运行上述命令需要root权限。yum会把下载的软件包和header存储在cache中,而不会自动删除。可用yum clean headers清除header,yum clean packages清除下载的rpm包,yum clean all全部清除。
页:
[1]