How to upgrade libc6 (glibc) beyond v 2.31 on Ubuntu 20.04?

I am using the Stockfish chess engine within some GUI, but yesterday it stopped working. I hadn’t changed the engine, nor the interface, but when I tried to run the engine it "terminated with code…", but it didn’t output any code. The only thing that could have changed is that I regularly upgrade my packages:
sudo apt update && sudo apt dist-upgrade, and I guess that must have broke it.
I installed the latest Stockfish Version and ran it in the command line, and the output it gives is:

./stockfish_21112912_x64_avx2: /lib/x86_64-linux-gnu/ version `GLIBC_2.32' not found (required by ./stockfish_21112912_x64_avx2)
./stockfish_21112912_x64_avx2: /lib/x86_64-linux-gnu/ version `GLIBC_2.33' not found (required by ./stockfish_21112912_x64_avx2)
./stockfish_21112912_x64_avx2: /lib/x86_64-linux-gnu/ version `GLIBC_2.34' not found (required by ./stockfish_21112912_x64_avx2)

So I wanted to upgrade GLIBC and I came upon this thread: []:
"Glibc (better known as GNU C Library) has a fork for linux which is called libc6. Libc6 is available via apt." I ran:
apt-cache policy libc6, which gave the output:

  Installed: 2.31-0ubuntu9.2
  Candidate: 2.31-0ubuntu9.2
  Version table:
 *** 2.31-0ubuntu9.2 500
        500 focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 focal/main amd64 Packages

Which tells me within the "normal" packages 2.31 is the official version for my OS version (Ubuntu 20.04).

So I tried doing it manually:How to install a libc6 version >= 2.29?

I downloaded libc6_2.34-0ubuntu3_amd64.deb from, as described, but when I ran: sudo dpkg -i libc6_2.34-0ubuntu3_amd64.deb, it produced the following error:

dpkg: regarding libc6_2.34-0ubuntu3_amd64.deb containing libc6:amd64:
 libc6:amd64 breaks fakeroot (<< 1.25.3-1.1ubuntu2~)
  fakeroot (version 1.24-1) is present and installed.

dpkg: error processing archive libc6_2.34-0ubuntu3_amd64.deb (--install):
 installing libc6:amd64 would break fakeroot, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:

How do I solve this? I am a bit of a newb, so preferably without breaking my system

Asked By: Markus Gratis


It should be noted that is not official, author clearly says that the packages were compiled with gcc 11.2/mingw 10 on Ubuntu 21.10.
While you are running 20.04 LTS which is older, so has older libc and other core system components.

I see two possible solutions:

  • Official packages from the developer

    The StockFish package for Ubuntu lists the following URL as developer’s web-site . So you should visit and then download relevant software distribution. For the time of writing it maybe done programmatically as follows:

    cd ~/Downloads
    wget -c
    cd stockfish_14.1_linux_x64_avx2
    chmod +x stockfish_14.1_linux_x64_avx2

    and then run it as ./stockfish_14.1_linux_x64_avx2.

    Note: it runs even on 18.04 LTS, does not complain about libc.

  • Some third-party PPA

    Finding PPA for StockFish is possible. It will end with for example StockFish 12.2 deb-package for 20.04 LTS, which may be installed by using below commands:

    sudo add-apt-repository ppa:savoury1/games
    sudo apt-get update
    sudo apt-get install stockfish

    Note: I’m not sure about AVX2 optimisation here.

    Reverting to default 11.1 version is possible by using below commands:

    sudo apt-get install ppa-purge
    sudo ppa-purge ppa:savoury1/games
Answered By: N0rbert

I had the same issue with Stockfish 15 on Ubuntu 20.04. However it’s not too difficult to compile from source following the directions at

cd src
make help

then check the latest arch supported, ex. grep bmi2 /proc/cpuinfo and make with the appropriate arch:

make net 
make build ARCH=x86-64-bmi2
Answered By: qwr