Install glibc2.16 in Ubuntu 12.04

2019-07-26 20:14发布

问题:

I'm using Ubuntu 12.04 and the binary I'm trying to run needs glibc2.16, I tried updating glibc by using apt-get install libc6 but only glibc2.15 got installed , can someone suggest me how to get glibc 2.16 in my machine.

Sorry if this question doesn't belong here, but I couldn't find any resource.

回答1:

You need to upgrade to a newer Ubuntu version, or recompile the software which currently needs glibc 2.16 specifically for Ubuntu 12.04, so that it will work with that older glibc version. Upgrading glibc has far-reaching consequences. I don't think there is any distribution which creates stable releases and which upgrades glibc within a stable release. For one thing, glibc tries hard to preserve backwards compatibility at the binary level, but less so at the source level, and a glibc upgrade could break downstream build processes.



回答2:

The command sudo apt-get install glibc6 would itself install the latest version of glibc, compatible for your distro.

And as "Florian Weimer" suggested, force upgrading glibc wouldn't be a great idea.



回答3:

You could build and install desired version of GLIBC from source into alternate location, and make the single application use it, as described in this answer.

Or you could prepare a suitable chroot jail, and run the application from it.

Or you could run the application inside of a virtual machine, such as Oracle VirtualBox.