Scenario: During an automated update (CentOS running cPanel), the server failed (it was not responding to http, imap, etc.). An SSH session was established and the server rebooted (shutdown -r now). This caused the server to become accessible again (email, website, etc.) However, later it was discovered that automated updates were no longer working, with an emailed error stating:
During a recent attempt to run /scripts/upcp, the system detected that your RPM database is unstable. The system cannot install RPMs, so the upcp script cannot proceed.
TIMEOUT: RPM DB is not responding after 10 minutes.
Accessing SSH again, and running yum update, displayed several errors, in particular:
Error: Package: glibc-devel-2.17-260.el7.x86_64 (@base)
Requires: glibc-headers = 2.17-260.el7
Removing: glibc-headers-2.17-260.el7.x86_64 (@base)
glibc-headers = 2.17-260.el7
Updated By: glibc-headers-2.17-260.el7_6.3.x86_64 (updates)
glibc-headers = 2.17-260.el7_6.3
You could try using –skip-broken to work around the problem
yum reinstall glibc-devel glibc-headers does not resolve the issue.
As the server failed to respond, and evidently appeared to have been rebooted during mid-update, it’s likely transactions did not complete. The command:
yum-complete-transaction
also did not resolve the issue in this scenario.
Solution: In this case list the related RPMs (because we’re looking to see specifically what’s installed, and if possible, hopefully see what’s contributing to any issue):
rpm -qa | grep glibc
Indeed, we see an issue in the following output (items in red):
root@node8652 [~]# rpm -qa | grep glibc
glibc-devel-2.17-260.el7_6.3.x86_64
glibc-static-2.17-260.el7_6.3.x86_64
glibc-headers-2.17-260.el7.x86_64
glibc-2.17-260.el7_6.3.x86_64
glibc-common-2.17-260.el7_6.3.x86_64
glibc-devel-2.17-260.el7.x86_64
In this case the references to (there should only be one glibc-devel.*):
glibc-devel-2.17-260.el7_6.3.x86_64
glibc-devel-2.17-260.el7.x86_64
Remove: glibc-devel-2.17-260.el7.x86_64 with the following command:
rpm -e glibc-devel-2.17-260.el7.x86_64
Note: Initially the other RPM was selected for removal, but an error was displayed indicating it was in use / required. Instead removing glibc-devel-2.17-260.el7.x86_64 displayed no error in terminal, and removed without issue.
Now run:
yum upate
and after successful update has completed, only then, restart the server.
Research reading:
yum error – package is a duplicate with:
https://stackoverflow.com/questions/19418301/yum-error-package-is-a-duplicate-with
CentOS yum install gcc error: glibc-common conflicts with glibc:
https://unix.stackexchange.com/questions/114676/centos-yum-install-gcc-error-glibc-common-conflicts-with-glibc
Yum Dependencies resolution fail (glibc-common):
https://www.linuxquestions.org/questions/linux-newbie-8/yum-dependencies-resolution-fail-glibc-common-4175582316/
Also… I should add (in this case) the following commands also did not help (although in some other scenarios they could):
yum clean metadata
or
yum clean all