Quantcast
Channel: linux – v-nessa.net
Viewing all articles
Browse latest Browse all 13

Resolving Duplicate glibc Packages on a CentOS Server

$
0
0

Here’s an unusual one – yum crashed in the middle of an update and somehow recorded multiple versions of glibc and glibc-common being installed, preventing Yum from updating:

[root@server ~]# package-cleanup --dupes
Loaded plugins: dellsysid, fastestmirror
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.x86_64
glibc-2.12-1.166.el6_7.3.i686
glibc-2.12-1.166.el6_7.3.i686
glibc-2.12-1.166.el6_7.3.i686
glibc-2.12-1.166.el6_7.3.i686
glibc-2.12-1.166.el6_7.3.i686
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64
glibc-common-2.12-1.166.el6_7.3.x86_64

Glibc is one of those base packages that nearly everything on the OS relies on.  Normally when you have duplicate packages, you can simply run the following command to resolve it:

package-cleanup --cleandupes

But, running this command on a server where glibc is one of the duplicate packages is extremely dangerous.  Doing this will attempt to remove everything that relies on glibc as a dependency.  In other words, you’re going to end up effectively removing CentOS.

So how do we fix this, you ask?  Just tell the rpmdb the package isn’t installed anymore:

rpm -e --nodeps --justdb glibc-2.12-1.166.el6_7.3.i686 --allmatches
rpm -e --nodeps --justdb glibc-common-2.12-1.166.el6_7.3.x86_64 --allmatches

Then reinstall both:

yum install glibc glibc.i686 glibc-common

This should safely resolve the issue.

 


Viewing all articles
Browse latest Browse all 13

Trending Articles