centos7使用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

猜你喜欢

转载自www.cnblogs.com/yjt1993/p/10097834.html