You can use following commands to bring in newer version of glibc in ubuntu 20.04, but note that as it is a system package, upgrading it may impact your system.

apt-get install gawk bison gcc make wget tar -y
wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.35.tar.gz
tar -zxvf glibc-2.35.tar.gz && cd glibc-2.35
mkdir glibc-build && cd glibc-build
../configure --prefix=/opt/glibc
make
make install
Answer from Atur on askubuntu.com
Top answer
1 of 2
6

You can use following commands to bring in newer version of glibc in ubuntu 20.04, but note that as it is a system package, upgrading it may impact your system.

apt-get install gawk bison gcc make wget tar -y
wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.35.tar.gz
tar -zxvf glibc-2.35.tar.gz && cd glibc-2.35
mkdir glibc-build && cd glibc-build
../configure --prefix=/opt/glibc
make
make install
2 of 2
0

Introducing glibc will break your core binaries. Updated core binaries require a newer kernel which breaks hardware drivers (like NVIDIA) that need your old kernel. This "vicious cycle" makes it impossible to use new glibc w/o breaking your system.

The only solution is to compile the unsupported drivers somehow for the new kernel. So far this is not possible.

If you try using GLIBC without updating its dependencies, you will get complaints of a version mismatch on its dependencies which go all the way down to the kernel, which is why it is not possible.

Your options are limited and it is not possible unless you use a virtual machine. But likely VM is not what you want because VMs do not have the advantage of talking to your hardware directly. They have some VM extensions for making that better but they only cover CPU and RAM, not the video/sound card, that is all emulated.

Summary

If you want to run something that needs newer hardware, there is just no way around that:

  1. You cant use unsupported hardware on newer kernel, and therefore linker, and then GLIBC.

  2. You can't use unsupported GLIBC on older kernel which relies on the new kernel features. If you try to do it by force (point to new compiled version of the new binaries) you will get an error that the linker/kernel versions are incorrect.

  3. The only solution to this is if there was a way to update your hardware drivers. If that isn't your problem, then UPGRADE UBUNTU to the latest version. If that IS your problem, then you are out of luck.

  4. Companies like NVIDIA and AMD drop video support after a few years and leave you up a creek with no paddle, stranded on an old OS unless you buy yet another video card (even if your current one is fast and does just fine, they do NOT care).

  5. Sandboxing in flatpak still needs those libraries to be able to link with your kernel. Sandboxing only fixes dependencies that are above the base system level. HOWEVER, if any of those libraries were built against a binaries that recursively rely on newer core libraries, you will still be stuck and it will still not work, below is an example:

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
(required by /tmp/.mount_my2newapp.a9fz3/usr/bin/../../usr/lib/liblzma.so.5)

As you can see here, even though the appimage/flatpak/snap was sandboxed, it still needed these new libraries further down the dependency chain.

🌐
Linuxier
linuxier.com › how-to-install-glibc-on-ubuntu
How to Install GLIBC on Ubuntu [22 Simple Steps] - Linuxier
May 12, 2024 - Configure your build environment with ../configure --disable-sanity-checks, compile it using make, and install by switching to the root user with sudo -s and executing make install.
🌐
Reddit
reddit.com › r/ubuntu › how do i update glibc?
r/Ubuntu on Reddit: How do I update GLIBC?
July 24, 2025 -

I’m currently using GLIBC 2.35 on Ubuntu 22.04, and I want to update it (for gaming purposes).

I’m also aware that updating it isn’t as simple as typing:

“sudo apt update GLIBC yada yada”

or whatever, so I’m not entirely sure how to update it properly without bricking my install.

Any ideas on what to do?

🌐
Its Linux FOSS
itslinuxfoss.com › home › ubuntu › how to install glibc on ubuntu 22.04
How to Install glibc on Ubuntu 22.04 – Its Linux FOSS
September 26, 2022 - Ubuntu 22.04 users can install “glibc” package by executing the command “sudo apt install glibc-source”. The “glibc” is a C library that supports GNU and Linux-based systems.
🌐
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 first option is to migrate your application to a system that supports GLIBC higher than or equal to 2.29. This would mean a lot of work though. It seems Ubuntu 19.04 actually uses that version.
Find elsewhere
🌐
TecMint
tecmint.com › home › linux commands › how to install and run multiple glibc libraries in linux
How to Install and Run Multiple glibc Libraries in Linux
June 13, 2024 - LD_PRELOAD=/usr/local/glibc-2.39/lib/ld-2.30.so ./your_application · 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.
🌐
Ubuntu
launchpad.net › ubuntu › +source › glibc
glibc package in Ubuntu
The following unsupported and untrusted Personal Archives (PPAs) provide packages of 'glibc': GCC x86-64-v2 owned by PPA for Ubuntu Toolchain Uploads (restricted)
🌐
idroot
idroot.us › home › how to install glibc on ubuntu 24.04 lts
How To Install GLIBC on Ubuntu 24.04 LTS - idroot
April 8, 2025 - This guide will walk you through the process of installing GLIBC on Ubuntu 24.04, offering detailed instructions, troubleshooting tips, and best practices to ensure a smooth experience.
🌐
LinuxVox
linuxvox.com › blog › install-glibc-ubuntu
Installing glibc on Ubuntu: A Comprehensive Guide — linuxvox.com
Basic knowledge of the Ubuntu command line. The easiest way to install glibc on Ubuntu is by using the apt package manager.
🌐
LinuxVox
linuxvox.com › blog › ubuntu-installglibc_228
Installing glibc 2.28 on Ubuntu: A Comprehensive Guide — linuxvox.com
Before starting any installation, ... security updates. Run the following commands: ... You can download the glibc 2.28 source code from the official GNU FTP server....
🌐
Ubuntu
packages.ubuntu.com › source › bionic › glibc
Ubuntu – Error
two or more packages specified (glibc bionic) Content Copyright © 2026 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Ask Ubuntu
askubuntu.com › questions › 1526185 › how-to-install-glibc-2-34-on-ubuntu-20-04
How to install GLIBC_2.34 on Ubuntu 20.04 - Ask Ubuntu
September 9, 2024 - There really is only one workaround for this that is 100% SAFE: Get a copy of virtualbox or some other thing that can run your software through virtualization extensions (lets guest OS talk to hardware directly to some degree) and install a small copy of your favorite GLIBC 2.34 OS operating system on that.
🌐
GitHub
github.com › vinsonlee › ubuntu-glibc › blob › applied › debian › buster › INSTALL
ubuntu-glibc/INSTALL at applied/debian/buster · vinsonlee/ubuntu-glibc
directory '/src/gnu/glibc-build' to put the object files in. This · allows removing the whole build directory in case an error occurs, which · is the safest way to get a fresh start and should always be done.
Author   vinsonlee
🌐
GitHub
github.com › jueve › build-glibc
GitHub - pitchsys/build-glibc: A note of building The GNU C Library(https://www.gnu.org/software/libc/) · GitHub
$ docker run -it ubuntu:20.04 /bin/bash # apt-get update # apt-get upgrade # apt-get install -y wget git # cd ~ # mkdir workdir # cd workdir # pwd /root/workdir · There are two options to get it, I think. ... # git clone https://sourceware.org/git/glibc.git # git --work-tree=/root/workdir/glibc --git-dir=/root/workdir/glibc/.git checkout glibc-2.31
Starred by 36 users
Forked by 3 users
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.