You can try to download glibc from the official source and install it:

wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
tar -zxvf glibc-2.29.tar.gz
mkdir glibc-2.29/build
cd glibc-2.29/build
../configure --prefix=/opt/glibc
make 
make install

Pay attention to avoid breaking your OS environment: you need to specify the prefix and configure the separate path when you are using it.


See this answer on how to use the alternate GLIBC.

Answer from Dolphin on Stack Overflow
Top answer
1 of 2
29

If you need glibc version other than the one shipped with ubuntu, one way is to install manually to a temp location in your $HOME. (installing in /usr would mess up with existing glibc in case something goes wrong)

mkdir $HOME/glibc/ && cd $HOME/glibc
wget http://ftp.gnu.org/gnu/libc/glibc-2.32.tar.gz
tar -xvzf glibc-2.32.tar.gz
mkdir build 
mkdir glibc-2.32-install
cd build
~/glibc/glibc-2.32/configure --prefix=$HOME/glibc/glibc-2.32-install
make
make install

Now you should have glibc 2.32 installed in the installation directory. You may check with ~/glibc/glibc-2.32-install/bin/ldd --version

2 of 2
1

Building on Shalini's answer,

#!/bin/bash

SOFTWARE_NAME=$1
SOFTWARE_VERSION=$2

export DOWNLOAD_INSTALL_DIR=$SOFTWARE_NAME-$SOFTWARE_VERSION-download-install
if [ -f $DOWNLOAD_INSTALL_DIR ];
then
    rm -fr $DOWNLOAD_INSTALL_DIR
    echo "Remove $DOWNLOAD_INSTALL_DIR"
fi

mkdir $HOME/$DOWNLOAD_INSTALL_DIR/ && cd $HOME/$DOWNLOAD_INSTALL_DIR

echo "Current directory at $PWD"

export DOWNLOADED_TAR=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION.tar.gz
if [ ! -f $DOWNLOADED_TAR ]; then
    wget https://ftp.gnu.org/gnu/$SOFTWARE_NAME/$SOFTWARE_NAME-$SOFTWARE_VERSION.tar.gz -P $HOME/$DOWNLOAD_INSTALL_DIR
    echo "Software is downloaded: $SOFTWARE_NAME, version = $SOFTWARE_VERSION "
else
    echo "Software is ALREADY downloaded: $SOFTWARE_NAME, version = $SOFTWARE_VERSION at $DOWNLOADED_TAR"
fi
tar -xvzf $DOWNLOADED_TAR -C $HOME/$DOWNLOAD_INSTALL_DIR
mkdir $HOME/$DOWNLOAD_INSTALL_DIR/build
export SOURCE_DIR=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION-install
mkdir $SOURCE_DIR
cd $HOME/$DOWNLOAD_INSTALL_DIR/build
~/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION/configure --prefix=$SOURCE_DIR
make
make install

export SOFTWARE_PATH=$HOME/$DOWNLOAD_INSTALL_DIR/$SOFTWARE_NAME-$SOFTWARE_VERSION-install/bin/$SOFTWARE_NAME
if [ -f $SOFTWARE_PATH ]; then
    echo "Software is found: $SOFTWARE_NAME, version = $SOFTWARE_VERSION at $SOFTWARE_PATH"
    mv $SOFTWARE_PATH $GRAND_ROOT_BIN
fi

You can use the script like so bash script-name.sh bison 3.8 for downloading GNU's bison with version number 3.8.

Discussions

how to install/update safely glibc on linuxmint 20.3
Glibc is the most central library of a GNU-based Linux system. Almost everything uses it. You should not try to upgrade it. You could upgrade your whole distro. Ubuntu 22.04 has version 2.35 of glibc, so I'd assume that versions of Mint that are based on Ubuntu 22.04 also have it. Or you could use some form of virtualization so that the newer version of glibc doesn't get used by the rest of your OS. Or you could build that program for your version of glibc (or try to find a build that someone else made). More on reddit.com
🌐 r/linuxquestions
8
2
February 6, 2023
gcc - Installation of glibc in my directory - Unix & Linux Stack Exchange
cp glibc-linuxthreads-2.5.tar.bz2 glibc-2.24 cd glibc-2.7 tar xvjf glibc-linuxthreads-2.5.tar.bz2 cd .. mkdir glibc-build cd glibc-build ~/Tool/glibc-2.7/configure --enable-add-ons=linuxthreads --prefix=$HOME/Programme/glibc checking build system type... x86_64-unknown-linux-gnu checking host ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
How install GLIBC 2.29 or higher in Ubuntu 18.04
OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/user/.local/lib/python3.6/site-packages/opencc/clib/lib/libopencc.so.1.1) Which is that one of the modules I use (opencc) needs GLIBC 2.29 or superior. Ubuntu “standard” version is 2.27, so I checked if I could install ... More on digitalocean.com
🌐 digitalocean.com
2
June 6, 2020
debian - Need to install glibc >= 2.14 on Wheezy - Unix & Linux Stack Exchange
I am trying to get Protractor working for performing e2e angular testing, but protractor requires Selenium which requires ChromeDriver which requires glibc 2.14. My current development box is running More on unix.stackexchange.com
🌐 unix.stackexchange.com
August 4, 2013
🌐
GNU
ftp.gnu.org › old-gnu › Manuals › glibc-2.2.3 › html_chapter › libc_36.html
The GNU C Library - Installing the GNU C Library
If you are upgrading from a previous installation of glibc 2.0 or 2.1, `make install' will do the entire job. You do not need to remove the old includes -- if you want to do so anyway you must then follow the order given above. You may also need to reconfigure GCC to work with the new library. The easiest way to do that is to figure out the compiler switches to make it work again (`-Wl,--dynamic-linker=/lib/ld-linux.so.2' should work on Linux systems) and use them to recompile gcc.
🌐
Niranjan
lfs.niranjan.co › museum › lfs-museum › 2.4.4 › LFS-BOOK-INTEL-2.4.4-HTML › ch05-glibc.html
Installing Glibc
cd ../glibc-2.1.3 && patch -Np1 ... localedata/install-locales · If your normal Linux system runs glibc-2.0, you need to copy the NSS library files to the LFS partition....
🌐
Linux From Scratch
linuxfromscratch.org › museum › lfs-museum › 5.1-pre1 › LFS-BOOK-5.1-PRE1-HTML › chapter05 › glibc.html
Installing Glibc-2.3.3
The Glibc documentation recommends building Glibc outside of the source directory in a dedicated build directory: ... --disable-profile: This disables the building of the libraries with profiling information. Omit this option if you plan to do profiling. --enable-add-ons=linuxthreads: This tells ...
Find elsewhere
🌐
Kali Linux
kali.org › tools › glibc
glibc | Kali Linux Tools
2 weeks ago - GNU C Library: sources This package contains the sources and patches which are needed to build glibc. Installed size: 22.71 MB How to install: sudo apt install glibc-source
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
How do I get new GLIBC version - Linux Mint Forums
May 18, 2022 - If your "/home" is on the same partition as "/", you will need to back up it first, including hidden files and settings, then install Mint (this time, choose two different partitions for your "/" and your "/home"), then copy your "/home" files, then reboot (you will have recovered your settings), then personalize your programs. With Mint 20.3, you will have glibc 2.31, allowing you to install your RimPy. An alternative solution is to build glibc from source, see https://www.linuxfromscratch.org/lfs/vi ...
🌐
TecMint
tecmint.com › home › linux commands › how to install and run multiple glibc libraries in linux
How to Install Multiple glibc Libraries on Linux
June 13, 2024 - By following these steps, you can install and manage multiple glibc versions on your Linux system, which allows you to run applications that depend on different glibc versions without interfering with your system’s default libraries.
🌐
Linux From Scratch
linuxfromscratch.org › lfs › view › development › chapter08 › glibc.html
8.5. Glibc-2.43
Upgrade the kernel API headers if it's older than 5.10 (check the current version with cat /usr/include/linux/version.h) or if you want to upgrade it anyway, following Section 5.4, “Linux-7.0.9 API Headers” (but removing $LFS from the cp command). Perform a DESTDIR installation and upgrade the Glibc shared libraries on the system using one single install command:
🌐
Linux Mint Forums
forums.linuxmint.com › board index › chat › chat about linux mint
Has anyone made any attempt to upgrade glibc? - Linux Mint Forums
January 27, 2024 - # unpackage tar -xzvf glibc-2.38.tar.gz mkdir eag mkdir /opt/glibc-2.38 cd eag ../configure --prefix=/opt/glibc-2.38 make # If you are sure you compiled correctly, then install sudo make install After that, "libc.so.6" 2.38 would be installed in "/opt/glibc2.38" while "libc.so.6" 2.35 would ...
🌐
The Linux Documentation Project
tldp.org › HOWTO › html_single › Glibc-Install-HOWTO
Glibc Installation HOWTO
March 19, 2004 - You can get the sources from: ftp.gnome.org/pub/gnome/sources/glib/2.2/, and the installation is straight-forward. ... Get the source from http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/"; at the time of writing, the newest version was 4.6.0. ... Now we come to the most important thing: ...
🌐
OpenGenus
iq.opengenus.org › install-specific-version-of-glibc
Install specific version of Glibc
October 17, 2022 - The different release packages of Glibc are available here: ... This will install Glibc in the correct location.
🌐
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
How to re-install glibc? [SOLVED] / Pacman & Package Upgrade Issues / Arch Linux Forums
boot a livemedia (such as an install cd/usb). then mount your drives and use pacman with the --root command to install glibc. ... Could you be a tad more specific? ... Sorry for asking spoonfeeding. I am pretty new to linux.
🌐
Linux From Scratch
linuxfromscratch.org › ~bdubbs › lfs-museum › 4.1 › LFS-BOOK-4.1-HTML › chapter06 › glibc.html
Installing Glibc-2.3.1
Before starting to install Glibc, you must cd into the glibc-2.3.1 directory and unpack Glibc-linuxthreads in that directory, not in /usr/src as you would normally do.
🌐
Stack Exchange
unix.stackexchange.com › questions › 345965 › installation-of-glibc-in-my-directory
gcc - Installation of glibc in my directory - Unix & Linux Stack Exchange
cp glibc-linuxthreads-2.5.tar.bz2 glibc-2.24 cd glibc-2.7 tar xvjf glibc-linuxthreads-2.5.tar.bz2 cd .. mkdir glibc-build cd glibc-build ~/Tool/glibc-2.7/configure --enable-add-ons=linuxthreads --prefix=$HOME/Programme/glibc checking build system ...
🌐
DigitalOcean
digitalocean.com › community › questions › how-install-glibc-2-29-or-higher-in-ubuntu-18-04
How install GLIBC 2.29 or higher in Ubuntu 18.04 | DigitalOcean
June 6, 2020 - The second option would be to actually build your GLIBC from source using the version you want or need. I’ve researched it a bit and found a website which actually gives you the steps for you to build the package from source : http://www.linuxfromscratch.org/lfs/view/9.0-systemd/chapter05/glibc.html