CentOS 6 is a rather old distribution, but it is still used in some places. On certain version 6 systems, when we need to install something new, even after introducing new RPMs, we sometimes get told that glibc needs to be updated. What a pain!

I searched online for a long time but could not find a glibc that matched CentOS 6. Then, in an obscure corner, I found an archive for Fedora 15 that happened to be barely usable.

Because going from 2.12 to 2.14 involves resolving related dependencies, to get glibc 2.14 working we need to download at least these packages:

glibc-2.14.1-6.x86_64.rpm
glibc-common-2.14.1-6.x86_64.rpm
glibc-devel-2.14.1-6.x86_64.rpm
glibc-headers-2.14.1-6.x86_64.rpm

Normally I am used to running yum localinstall some-rpm.rpm, but that will not work here because glibc and glibc-common are circular dependencies... Also, different versions of glibc and glibc-headers are incompatible, so they must be installed together.

The fix is to put them in a directory and run the command

Bash
$ sudo rpm -Fhv glibc*
warning: glibc-2.14.1-6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 069c8460: NOKEY
Preparing...                ########################################### [100%]
   1:glibc-common           ########################################### [ 25%]
   2:glibc                  warning: /etc/localtime created as /etc/localtime.rpmnew
########################################### [ 50%]
   3:glibc-headers          ########################################### [ 75%]
   4:glibc-devel            ########################################### [100%]

Then it is done.

After resolving this dependency, installing other things seems to work fine.


Supplementary notes

If you are not under pressure to keep the system as-is, I strongly recommend doing a major-version upgrade — it is more stable and has fewer hidden pitfalls.

If you work for some awkward organization and the client absolutely insists on operating on CentOS 6, or migration itself is difficult, then this method can serve as a temporary fix. In that case, you can grab a newer package and force the upgrade. Since there are no other dependencies, there should not be any big problems.

For example, under the 163 mirror, Fedora 27 has these packages:

It is probably fine.

But to stress again: do not hack things manually when an automatic upgrade is possible. Life is short; use a newer version. :)