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.comYou 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
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:
You cant use unsupported hardware on newer kernel, and therefore linker, and then GLIBC.
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.
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.
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).
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.
It turns out I was just not familiar enough with apt-get. I managed to install the necessary glibc version by issuing the following command:
apt-get install libc-bin=2.13-38+deb7u4 libc6=2.13-38+deb7u4
I even downgraded it and everything works okay. Core dump analysis works now.
I wouldn't install it, but unpack it in some work directory and refer to it via LD_LIBRARY_PATH. Downgrading your libc6 package can be quite problematic.
Your customer should be able to supply you with their libc6 version. It might, however, be advisable to use the libc6-dbg package which includes debug symbols. Unfortunately the 7u4 version is an older one and not available anymore.
How install GLIBC 2.29 or higher in Ubuntu 18.04
How do I update GLIBC?
glibc - Install glibc2.16 in Ubuntu 12.04 - Stack Overflow
Good news for apt users: glibc-packages are now available in apt!
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 isn't complete as it produces error from make: Makeconfig:42: *** missing separator. Stop.
In my case, to I had to do following:
# Check GLIBC_2.29
ldd --version | head -n1
# Build GLIBC_2.29 from sources
sudo apt-get install gawk bison -y
wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.gz
tar -zxvf glibc-2.34.tar.gz && cd glibc-2.34
mkdir glibc-build && cd glibc-build
../configure --prefix=/opt/glibc-2.34
make
sudo make install
P.S. If you are trying to run ord just try building from sources, it's much simpler than upgrading ubuntu or recompiling GLIBC
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?
You need to upgrade to a newer Ubuntu version, or recompile the software which currently needs glibc 2.16 specifically for Ubuntu 12.04, so that it will work with that older glibc version. Upgrading glibc has far-reaching consequences. I don't think there is any distribution which creates stable releases and which upgrades glibc within a stable release. For one thing, glibc tries hard to preserve backwards compatibility at the binary level, but less so at the source level, and a glibc upgrade could break downstream build processes.
You could build and install desired version of GLIBC from source into alternate location, and make the single application use it, as described in this answer.
Or you could prepare a suitable chroot jail, and run the application from it.
Or you could run the application inside of a virtual machine, such as Oracle VirtualBox.
As j0h described, I was able to solve my problem. Here is what I have done:
- I read at Wikipedia about glibc. Glibc (better known as GNU C Library) has a fork for linux which is called libc6. Libc6 is available via apt.
- Run
apt-get updateto update the database. - Use
apt-cache policy libc6to find out the installed version and the candidate version, whereas the installed version can be also shown withldd --version. - Install the new candidate version with
apt-get install libc6 - Check the new version again by doing step 3 again to see your success.
For most security updates such as this you should be able to rest easy knowing that if your version of Ubuntu is still actively supported you will automatically receive such important updates.
Check in 'Software & Updates' that you have the correct boxes checked to:
- Enable you to receive Security Updates
- Allow regular checking of the Repository
- Optionally automatically download and install Security Updates
Below is a screenshot showing you the relevant section of 'Software & Updates':

This screenshot is for Ubuntu 15.1 Wily Werewolf but will be the same through most modern releases of Ubuntu...
To access it, you just need to install the glibc-repo package:
apt update apt install glibc-repo -y # After this you have access to glibc-packages apt install glibc-runner -y
You don't have to switch to the unstable to get glib >= 2.14. In fact, the testing branch (now stable, or Jessie) has glib-2.17 which you can pick just adding the testing repository and launching:
sudo apt-get install libc6-dev=2.17-7
or,
sudo apt-get -t testing install libc6-dev
You can add the switch --dry-run to see what will being installed before hand. You can see the status of the glibc package in the Debian Package Tracker System (Debian renamed eglibc package to simply glibc from Jessie onwards).
You can also just wait for Jessie release on April 25.
In my situation, the error appears when I try to run an application (compiled on Ubuntu 12.04 LTS) using GLIBC_2.14 on Debian Wheezy (which installs glibc 2.13 by default).
I use a tricky way to run it, and get correct result:
Download
libc6andlibc6-devfrom Ubuntu 12.04 LTSRun
dpkgcommand to install them into a directory (/home/user/fakeroot/for example):$ dpkg -x libc6-dev_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/ $ dpkg -x libc6_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/Run your command with specified
LD_LIBRARY_PATH:$ LD_LIBRARY_PATH=/home/user/fakeroot/lib/x86_64-linux-gnu/ YOUR_COMMANDMy application only uses
memcpy()from GLIBC_2.14, and it works.I don't know whether it will work successfully for other applications.