glibc Upgrade – How to Properly Upgrade glibc

glibcupgrade

The firmware of my NAS comes with a rather old version of glibc, namely 2.5. In order to cope with some precompiled binaries linked* to glibc 2.15, I would like to upgrade it. From some simple testing in a chroot environment I learned simply adding the newer libc-2.15.so and updating the symlink libc.so.6 will yield an unusable system; probably due to libc-2.15.so being linked to ld-linux.so.3 in turn, which would of course also require the 2.15 version instead of the 2.5 one. But before I descend into too much trial and error,

what is the correct procedure to manually upgrade glibc?


*despite being linked "statically", they still dynamically link to glibc…

Best Answer

Upgrading the standard library is risky, as some programs and libraries may depend on the current version.

My recommendation if you need to run newer programs is to install a full chrooted distribution. This requires more disk space, but is a lot simpler and less risky than trying to update libc. Debian provides a tool to facilitate installations in a chroot: debootstrap. See Installing two glibc alongside in debian/ubuntu (a very similar situation) for more explanations and How do I run 32-bit programs on a 64-bit Debian/Ubuntu? for a full how-to in a slightly different situation.

Related Question