8

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...

  • "In order to cope with some precompiled binaries (despite being linked "statically", they still dynamically link to glibc...) linked to glibc 2.15." Taking out the brackets, this reduces to "In order to cope with some precompiled binaries linked to glibc 2.15.". I'm not sure what that means. – Faheem Mitha Nov 5 '14 at 8:02
  • @FaheemMitha Thanks for pointing that out, I never realized I forgot finishing that sentence - hope it makes more sense now – Tobias Kienzler Nov 5 '14 at 8:32
  • Yes, it reads better now, though having that embedded bracket does not help with clarity. I assume that rebuilding the firmware with a newer libc is not an option? – Faheem Mitha Nov 5 '14 at 12:40
  • @FaheemMitha Debracketed now. No, the firmware unfortunately contains some proprietary components :/ – Tobias Kienzler Nov 5 '14 at 13:21
  • Nitpick city. You marking your text with a *, but are using a 1 in your "footnote." Yes, that is (part of why) proprietary sofrware sucks. Look for free third party firmware perhaps? Or develop your own. Easier said than done, granted. – Faheem Mitha Nov 5 '14 at 13:25
6

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.

  • 1
    I feared as much... Actually I am currently using a chrooted Gentoo installation. In order to compile out-of-chroot binaries it'd probably be easier to downgrade Gentoo's glibc then, or use a sufficiently old version... Then again I severely doubt (or at least hope not) this is the final answer. – Tobias Kienzler Nov 19 '13 at 15:46
  • What do you mean by saying upgrading glibc "is risky"? Glibc is backward compatible, so it should generally work or did I not understand something here? – Nils Jul 4 '17 at 7:24
  • 2
    @Nils What you're missing is the difference between should and does. Programs sometimes depend on undocumented behavior that changes between versions. – Gilles Jul 4 '17 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.