Coding Software

glibc_2.34 not found Error in Ubuntu

Check Your glibc Version

Use the command ldd --version because it shows your current glibc version. For example, Ubuntu 20.04 LTS uses glibc 2.31 and Ubuntu 22.04 LTS uses glibc 2.35.

So What Is Actually the Problem?

glibc is backward compatible but not forward compatible.

Programs compiled with newer glibc versions won’t run on systems with older versions.

This is why you get this error when trying to run newer software on an older Ubuntu version.

The First Things to Do

Updating Ubuntu

1. First, update your Ubuntu files:

sudo apt update
sudo apt upgrade

2. Then upgrade to a new Ubuntu version altogether:

sudo do-release-upgrade

This is a major change and can take many hours. Backup your data first.

Using a Container or VM

Docker is useful for running applications that need a newer glibc:

docker run --rm -it ubuntu:latest /bin/bash

For the Virtual Machine you could use VirtualBox or KVM to install a newer Ubuntu version.

Compiling From Source

This can be complex and changes from one program to another.

You download the source code, install build dependencies and compile.


sudo make install

Finding an Older Version

Search for older releases of the software compatible with your glibc version.

There are some security issues when using older versions.

glibc overlay (not recommended):

This involves installing a newer glibc alongside your system’s version.

It’s risky and can break your system. Only attempt if you’re very experienced.

For Developers

To compile against an older glibc:

export GLIBC_VERSION=2.31
gcc -Wl,--rpath=/lib/x86_64-linux-gnu -Wl,--dynamic-linker=/lib/x86_64-linux-gnu/ld-${GLIBC_VERSION}.so your_program.c

For static linking (where possible):

gcc -static your_program.c -o your_program

Other Things

Check if the software is available as a Snap or Flatpak, which will  include the important dependencies.

Some projects offer AppImages, which are self contained and work in different Linux distributions.

Long Term Solutions

Keep your system updated regularly to avoid large version gaps.

Consider using LTS (Long Term Support) versions of Ubuntu for better stability and longer support periods.

Leave a Reply

Your email address will not be published. Required fields are marked *