Skip to content

Instantly share code, notes, and snippets.

@jannson
Forked from cheuerde/glibc_install.sh
Created December 18, 2021 10:50
Show Gist options
  • Save jannson/a056bcb589c743eabb514360ed1d1cb1 to your computer and use it in GitHub Desktop.
Save jannson/a056bcb589c743eabb514360ed1d1cb1 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=2.19
# 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 ###
##############################################
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