Skip to content

Instantly share code, notes, and snippets.

@jcgregorio
Forked from cheuerde/glibc_install.sh
Last active April 28, 2022 12:58
Show Gist options
  • Save jcgregorio/c2f5e673714c17a207e419823c9eed9b to your computer and use it in GitHub Desktop.
Save jcgregorio/c2f5e673714c17a207e419823c9eed9b to your computer and use it in GitHub Desktop.
Install GNU libc version parallel to existing system
# Claas Heuer, August 2015
#
# urls:
# http://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host
# http://www.gnu.org/software/libc/download.html
cd $HOME
mkdir glibc_update
cd glibc_update
libc_version=3.4.26
# get the version you want:
wget http://ftp.gnu.org/gnu/glibc/glibc-${libc_version}.tar.gz
tar -xf glibc-${libc_version}.tar.gz
# configure and set the installation path
cd glibc-${libc_version}
mkdir build
cd build
../configure --prefix=/opt/glibc${libc_version}
# compile
make -j6
sudo make install
##############################################
### Run some software that need that glibc ###
##############################################
echo LD_PRELOAD="/opt/glibc${libc_version}/lib/libc.so.6 /opt/glibc${libc_version}/lib/libpthread.so.0 /opt/glibc${libc_version}/lib/ld-linux-x86-64.so.2" ./my_prog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment