在RHEL 7上,使用YUM更新一段时间后,由于与服务器的连接中断并且YUM会话未在屏幕中运行,因此YUM事务未正确完成。
--> Processing Conflict: firewalld-0.4.4.4-6.el7.noarch conflicts selinux-policy < 3.13.1-118.el7
--> Finished Dependency Resolution
You could try using --skip-broken to work around the problem
** Found 157 pre-existing rpmdb problem(s), 'yum check' output follows:
audit-2.7.6-3.el7.x86_64 is a duplicate with audit-2.6.5-3.el7_3.1.x86_64
audit-libs-2.7.6-3.el7.x86_64 is a duplicate with audit-libs-2.6.5-3.el7_3.1.x86_64
audit-libs-python-2.7.6-3.el7.x86_64 is a duplicate with audit-libs-python-2.6.5-3.el7_3.1.x86_64
bash-4.2.46-29.el7_4.x86_64 is a duplicate with bash-4.2.46-21.el7_3.x86_64
32:bind-libs-9.9.4-51.el7_4.2.x86_64 is a duplicate with 32:bind-libs-9.9.4-50.el7_3.1.x86_64
32:bind-libs-lite-9.9.4-51.el7_4.2.x86_64 is a duplicate with 32:bind-libs-lite-9.9.4-50.el7_3.1.x86_64
32:bind-license-9.9.4-51.el7_4.2.noarch is a duplicate with 32:bind-license-9.9.4-50.el7_3.1.noarch
...
因此交易未完成,并且某些软件包在2个版本中列出。
在这种状态下,yum update
报告:
# yum update
Loaded plugins: product-id, search-disabled-repos
Resolving Dependencies
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 history redo force-reinstall last --setopt=protected_multilib=false
也就是说yum
,再次使用force-reinstall
参数执行最后一个事务。该--setopt=protected_multilib=false
可能不会在所有情况下(在我这是因为grub2的包装问题,)是必需的。
该事务可能会报告在此过程中两次列出的软件包中的一些错误,但是该事务已完成并且RPM的状态似乎正确。
但是,yum仍然抱怨交易未完成(但不再失败)。现在可以安全删除它们:
$ yum-complete-transaction --cleanup-only
截至目前,YUM仍可像以前一样运行。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句