Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install multiple versions of glibc?

Tags:

c

ubuntu

glibc

I have a glibc version 2.19 on ubuntu installed. I would also like to install 2.3.4 version along with 2.19 on my machine.

By default, all the program should use 2.19 but only specific program should use 2.3.4.

The two questions are:

  1. How should I install the 2.3.4 at particular location, say /usr/glibc2.3.4?
  2. How should I specify particular program to use the 2.3.4 version?
like image 221
UnSat Avatar asked Jan 31 '15 22:01

UnSat


1 Answers


If you just want the dynamic libraries from the other version of glibc you can simply use LD_LIBRARY_PATH. But if you want to fully use the other version you need to compile against the other version to get the static parts. And you might want to compile the other version of glibc as well to get all the hardcoded paths to point to your installation directory for loading datafiles and plugins (for NSS and gconv). Using --prefix=/usr/glibc2.3.4 will also set the soname of the dynamic loader to /usr/glibc2.3.4/lib/ld-linux.so.2 (or something similar depending on your architecture) which will be hardcoded into every program linked against it.

like image 69
Fabel Avatar answered Sep 26 '22 03:09

Fabel