一、问题说明
今天升级centos7系统,放在screen里执行yum update,由于网络波动造成远程断线,重新登录后进入screen里发现yum进程不动了,然后就kill掉了yum进程再装的时候就报错无法安装了.报错提示:
1 2 3 4 5 6 7 8 |
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). The program yum-complete-transaction is found in the yum-utils package. 校验包时的提示: Error: initscripts conflicts with centos-release-7-2.1511.el7.centos.2.10.x86_64 Error: kernel conflicts with xfsprogs-3.2.2-2.el7.x86_64 You could try using --skip-broken to work around the problem ** Found 198 pre-existing rpmdb problem(s), 'yum check' output follows: |
二、解决办法
上网查了下基本这么写
安装yum-complete-transaction
1 |
yum -y install yum-utils |
运行yum-complete-transaction
1 |
yum-complete-transaction --cleanup-only |
清除可能存在的重复包
1 |
package-cleanup --dupes |
清除可能存在的损坏包
1 |
package-cleanup --problems |
测试无果,依旧提示错误
还有说
1 2 3 4 5 |
rm -f /var/run/yum.pid yum install yum-utils yum clean all yum-complete-transaction --cleanup-only yum history redo last |
测试依旧没解决
最后使用
1 |
package-cleanup --cleandupes --removenewestdupes |
解决了依赖问题安装过去了