Multiple version issue of glibc-common package on RHEL systems

NeilZhang
NeilZhang
管理员
140
文章
106.8千
浏览
Linux评论503字数 1020阅读3分24秒阅读模式

These days we are doing some maintenance tasks on hundreds of RHEL servers and we update them using a shell script. We failed to update part of them and after I fixed the failure I would like to share the solution here.

Usually after the update script was run, we would reboot the servers to use the latest kernel and we found the failure was caused by the terminated yum update command abnormally. In other words, we rebooted the servers too early.

Run the command 'package-cleanup --dupes' and we would get the rpm packages with multiple versions:

  1. [root@xxxxxx ~]# package-cleanup --dupes
  2. Loaded plugins: fastestmirror
  3. firewalld-filesystem-0.5.3-5.el7.noarch
  4. firewalld-filesystem-0.6.3-2.el7_7.1.noarch
  5. grub2-common-2.02-0.76.el7.1.noarch
  6. grub2-common-2.02-0.80.el7.noarch
  7. libipa_hbac-1.16.2-13.el7_6.8.x86_64
  8. libipa_hbac-1.16.4-21.el7.x86_64
  9. audit-libs-2.8.5-4.el7.x86_64
  10. audit-libs-2.8.4-4.el7.x86_64
  11. libsss_autofs-1.16.2-13.el7_6.8.x86_64
  12. libsss_autofs-1.16.4-21.el7.x86_64
  13. python-firewall-0.6.3-2.el7_7.1.noarch
  14. python-firewall-0.5.3-5.el7.noarch
  15. grub2-tools-2.02-0.76.el7.1.x86_64
  16. grub2-tools-2.02-0.80.el7.x86_64
  17. bind-license-9.11.4-9.P2.el7.noarch
  18. bind-license-9.9.4-74.el7_6.1.noarch
  19. samba-common-4.8.3-4.el7.noarch
  20. samba-common-4.9.1-6.el7.noarch
  21. libsss_sudo-1.16.4-21.el7.x86_64
  22. libsss_sudo-1.16.2-13.el7_6.8.x86_64
  23. nss-3.36.0-7.1.el7_6.x86_64
  24. nss-3.44.0-4.el7.x86_64
  25. python-sssdconfig-1.16.2-13.el7_6.8.noarch
  26. python-sssdconfig-1.16.4-21.el7.noarch
  27. libsss_idmap-1.16.4-21.el7.x86_64
  28. libsss_idmap-1.16.2-13.el7_6.8.x86_64
  29. NetworkManager-libnm-1.12.0-10.el7_6.x86_64
  30. NetworkManager-libnm-1.18.0-5.el7_7.1.x86_64
  31. grub2-pc-modules-2.02-0.80.el7.noarch
  32. grub2-pc-modules-2.02-0.76.el7.1.noarch
  33. dracut-033-554.el7.x86_64
  34. dracut-033-564.el7.x86_64
  35. sssd-client-1.16.2-13.el7_6.8.x86_64
  36. sssd-client-1.16.4-21.el7.x86_64
  37. plymouth-core-libs-0.8.9-0.31.20140113.el7.x86_64
  38. plymouth-core-libs-0.8.9-0.32.20140113.el7.x86_64
  39. libcom_err-1.42.9-13.el7.x86_64
  40. libcom_err-1.42.9-16.el7.x86_64
  41. dhcp-libs-4.2.5-77.el7.x86_64
  42. dhcp-libs-4.2.5-68.el7_5.1.x86_64
  43. openssl-libs-1.0.2k-16.el7_6.1.x86_64
  44. openssl-libs-1.0.2k-19.el7.x86_64
  45. selinux-policy-3.13.1-229.el7_6.12.noarch
  46. selinux-policy-3.13.1-252.el7.1.noarch
  47. libss-1.42.9-16.el7.x86_64
  48. libss-1.42.9-13.el7.x86_64
  49. openssh-7.4p1-21.el7.x86_64
  50. openssh-7.4p1-16.el7.x86_64
  51. dhcp-common-4.2.5-77.el7.x86_64
  52. dhcp-common-4.2.5-68.el7_5.1.x86_64
  53. grub2-tools-minimal-2.02-0.80.el7.x86_64
  54. grub2-tools-minimal-2.02-0.76.el7.1.x86_64
  55. e2fsprogs-libs-1.42.9-13.el7.x86_64
  56. e2fsprogs-libs-1.42.9-16.el7.x86_64

We could remove some of them using 'package-cleanup --cleandupes' command and would get errors for others:

  1. [root@xxxxxx ~]# package-cleanup --cleandupes
  2. Loaded plugins: fastestmirror
  3. Not removing bind-license-9.9.4-74.el7_6.1.noarch because it is required by 2 installed packages
  4. Not removing libsss_idmap-1.16.2-13.el7_6.8.x86_64 because it is required by 1 installed package
  5. Not removing dracut-033-554.el7.x86_64 because it is required by 2 installed packages
  6. Not removing plymouth-core-libs-0.8.9-0.31.20140113.el7.x86_64 because it is required by 1 installed package
  7. Not removing libsss_autofs-1.16.2-13.el7_6.8.x86_64 because it is required by 1 installed package
  8. Not removing libss-1.42.9-13.el7.x86_64 because it is required by 1 installed package
  9. Not removing grub2-pc-modules-2.02-0.76.el7.1.noarch because it is required by 1 installed package
  10. Not removing libipa_hbac-1.16.2-13.el7_6.8.x86_64 because it is required by 1 installed package
  11. Not removing sssd-client-1.16.2-13.el7_6.8.x86_64 because it is required by 1 installed package
  12. Not removing selinux-policy-3.13.1-229.el7_6.12.noarch because it is required by 2 installed packages
  13. Not removing grub2-common-2.02-0.76.el7.1.noarch because it is required by 2 installed packages
  14. Not removing grub2-tools-2.02-0.76.el7.1.x86_64 because it is required by 2 installed packages
  15. Not removing python-firewall-0.5.3-5.el7.noarch because it is required by 1 installed package
  16. Not removing dhcp-common-4.2.5-68.el7_5.1.x86_64 because it is required by 1 installed package
  17. Not removing openssl-libs-1.0.2k-16.el7_6.1.x86_64 because it is required by 1 installed package
  18. Not removing firewalld-filesystem-0.5.3-5.el7.noarch because it is required by 1 installed package
  19. Not removing libsss_sudo-1.16.2-13.el7_6.8.x86_64 because it is required by 1 installed package
  20. Not removing nss-3.36.0-7.1.el7_6.x86_64 because it is required by 1 installed package
  21. Not removing e2fsprogs-libs-1.42.9-13.el7.x86_64 because it is required by 1 installed package
  22. Not removing openssh-7.4p1-16.el7.x86_64 because it is required by 2 installed packages
  23. Not removing dhcp-libs-4.2.5-68.el7_5.1.x86_64 because it is required by 1 installed package
  24. Not removing NetworkManager-libnm-1.12.0-10.el7_6.x86_64 because it is required by 2 installed packages
  25. Not removing grub2-tools-minimal-2.02-0.76.el7.1.x86_64 because it is required by 2 installed packages
  26. Not removing samba-common-4.8.3-4.el7.noarch because it is required by 6 installed packages
  27. Not removing libcom_err-1.42.9-13.el7.x86_64 because it is required by 1 installed package
  28. Not removing python-sssdconfig-1.16.2-13.el7_6.8.noarch because it is required by 1 installed package
  29. ......................

At the first time I tried to resolve these conflict one by one. For instance, the package dhcp-common-4.2.5-68.el7_5.1.x86_64 could not be removed and I tried to know what package blocked this action. I run 'yum remove dhcp-common-4.2.5-68.el7_5.1.x86_64' but input 'n' to interrupt such removal and found package dhclient was the reason.

In fact, if the update script run well, there should be just one version, the newer one, packages on the system. But it was terminated, so not all the old packages were updated and removed. For this reason, I updated the dependent package dhclient to latest version, then run 'package-cleanup --cleandupes' command again and it let me to remove the old dhcp-common-4.2.5-68.el7_5.1.x86_64.

Using the above way most conflicts could be resolved except the glibc-common package.

I run below commands to confirm the newer version was installed correctly, then removed the old one and updated the dependent glibc.i686.

  1. [root@xxxxxx yum.repos.d]# rpm -V glibc-common-2.17-260.el7_6.6.x86_64
  2. S.5...... /usr/bin/gencat
  3. S.5...... /usr/bin/getconf
  4. S.5...... /usr/bin/getent
  5. S.5...... /usr/bin/iconv
  6. S.5...... /usr/bin/locale
  7. S.5...... /usr/bin/localedef
  8. S.5...... /usr/bin/makedb
  9. S.5...... /usr/bin/pldd
  10. S.5...... /usr/bin/rpcgen
  11. S.5...... /usr/bin/sprof
  12. S.5...... /usr/sbin/build-locale-archive
  13. S.5...... /usr/sbin/zdump
  14. S.5...... /usr/sbin/zic
  15. S.5...... d /usr/share/doc/glibc-common-2.17/ChangeLog.bz2
  16. S.5...... /usr/share/i18n/charmaps/IBM273.gz
  17. [root@xxxxxx yum.repos.d]# rpm -V glibc-common-2.17-292.el7.x86_64
  18. [root@xxxxxx yum.repos.d]# rpm -e --justdb glibc-common-2.17-260.el7_6.6.x86_64
  19. error: Failed dependencies:
  20. glibc-common = 2.17-260.el7_6.6 is needed by (installed) glibc-2.17-260.el7_6.6.i686
  21. [root@xxxxxx yum.repos.d]# rpm -e --justdb --nodeps glibc-common-2.17-260.el7_6.6.x86_64
  22. [root@xxxxxx yum.repos.d]# yum update glibc.i686

Finally I could run our update script successfully.

 
  • 本文由 NeilZhang 发表于19/10/2019 21:58:19
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/linux/multiple-version-issue-of-glibc-common-package-on-rhel-systems/
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定