Error: Package: glibc-common-2.17-260.el7_6.5.x86_64 (@updates)
Requires: glibc = 2.17-260.el7_6.5
Removing: glibc-2.17-260.el7_6.5.i686 (@updates)
glibc = 2.17-260.el7_6.5
Updated By: glibc-2.17-292.el7.i686 (base)
glibc = 2.17-292.el7
You could try using –skip-broken to work around the problem
** Found 44 pre-existing rpmdb problem(s), ‘yum check’ output follows:
1:NetworkManager-libnm-1.18.0-5.el7_7.1.x86_64 is a duplicate with 1:NetworkManager-libnm-1.12.0-10.el7_6.x86_64
32:bind-license-9.11.4-9.P2.el7.noarch is a duplicate with 32:bind-license-9.9.4-73.el7_6.noarch
cpp-4.8.5-39.el7.x86_64 is a duplicate with cpp-4.8.5-36.el7_6.2.x86_64
dracut-033-564.el7.x86_64 is a duplicate with dracut-033-554.el7.x86_64
e2fsprogs-libs-1.42.9-16.el7.x86_64 is a duplicate with e2fsprogs-libs-1.42.9-13.el7.x86_64
elfutils-libelf-0.176-2.el7.x86_64 is a duplicate with elfutils-libelf-0.172-2.el7.i686
上面是一大堆报错,解决命令:
1 2 3 |
rpm -e --justdb --nodeps <包名> |
包名是错误输出中最前面的名字,如上面的 NetworkManager-libnm-1.18.0-5.el7_7.1.x86_64,注意不要带上前面的数字
如果重复包太多,可以把错误输出保存到文件中,假设名为f,然后用命令行处理只保留下开头的名字,并去除最前面的数字,这里我们用vim打开后解决。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
1:NetworkManager-libnm-1.18.0-5.el7_7.1.x86_64 is a duplicate with 1:NetworkManager-libnm-1.12.0-10.el7_6.x86_64 32:bind-license-9.11.4-9.P2.el7.noarch is a duplicate with 32:bind-license-9.9.4-73.el7_6.noarch cpp-4.8.5-39.el7.x86_64 is a duplicate with cpp-4.8.5-36.el7_6.2.x86_64 dracut-033-564.el7.x86_64 is a duplicate with dracut-033-554.el7.x86_64 e2fsprogs-libs-1.42.9-16.el7.x86_64 is a duplicate with e2fsprogs-libs-1.42.9-13.el7.x86_64 elfutils-libelf-0.176-2.el7.x86_64 is a duplicate with elfutils-libelf-0.172-2.el7.i686 elfutils-libs-0.176-2.el7.x86_64 is a duplicate with elfutils-libs-0.172-2.el7.i686 fail2ban-firewalld-0.10.4-1.el7.noarch is a duplicate with fail2ban-firewalld-0.9.7-1.el7.noarch fail2ban-sendmail-0.10.4-1.el7.noarch is a duplicate with fail2ban-sendmail-0.9.7-1.el7.noarch fail2ban-server-0.10.4-1.el7.noarch is a duplicate with fail2ban-server-0.9.7-1.el7.noarch ... |
先按ESC,再键入如下字符后回车
1 2 3 |
:%s/^\d\+:// |
同上键入如下字符后回车:
1 2 3 |
:%s/\ .*/ |
处理后会变为如下:
1 2 3 4 5 6 7 8 9 10 11 |
NetworkManager-libnm-1.18.0-5.el7_7.1.x86_64 bind-license-9.11.4-9.P2.el7.noarch cpp-4.8.5-39.el7.x86_64 dracut-033-564.el7.x86_64 e2fsprogs-libs-1.42.9-16.el7.x86_64 elfutils-libelf-0.176-2.el7.x86_64 elfutils-libs-0.176-2.el7.x86_64 fail2ban-firewalld-0.10.4-1.el7.noarch ... |
再用rpm命令解决重复问题:
1 2 3 |
rpm -e --justdb --nodeps `cat f` |