13

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/libc.so.6: version `GLIBC_2.32' not found (required by ./stockfish_21112912_x64_avx2)
./stockfish_21112912_x64_avx2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./stockfish_21112912_x64_avx2)
./stockfish_21112912_x64_avx2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./stockfish_21112912_x64_avx2)

So I wanted to upgrade GLIBC and I came upon this thread: [https://askubuntu.com/questions/736208/upgrading-glibc]: "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:

libc6:
  Installed: 2.31-0ubuntu9.2
  Candidate: 2.31-0ubuntu9.2
  Version table:
 *** 2.31-0ubuntu9.2 500
        500 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://de.archive.ubuntu.com/ubuntu 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 http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/, 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:
 libc6_2.34-0ubuntu3_amd64.deb

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

7
  • 3
    Do not upgrade libc because of single application, it is very dangerous action. How Stockfish was installed? What is its version? From which PPA/Flatpak/Appimage/Snap/tar?
    – N0rbert
    Dec 1, 2021 at 8:37
  • I get it from here: abrok.eu/stockfish It's the linux for modern computers + av2 version that always worked. I really, really depend on this I'm afraid -_- Dec 1, 2021 at 8:44
  • Does this answer your question? Why don't the Ubuntu repositories have the latest versions of software?
    – guiverc
    Dec 1, 2021 at 8:53
  • Just curious what is your CPU model?
    – N0rbert
    Dec 1, 2021 at 9:07
  • @N0rbert it's an Intel Core i7-4710HQ Dec 1, 2021 at 9:36

2 Answers 2

3

It should be noted that https://abrok.eu/stockfish/ 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 https://stockfishchess.org . So you should visit https://stockfishchess.org/download/linux/ and then download relevant software distribution. For the time of writing it maybe done programmatically as follows:

    cd ~/Downloads
    wget -c https://stockfishchess.org/files/stockfish_14.1_linux_x64_avx2.zip
    unzip stockfish_14.1_linux_x64_avx2.zip
    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
    
4
  • 1
    Thank you! I went for the official 14.1 release and now it works :) Dec 1, 2021 at 9:45
  • I found that the downloads page only linked to the latest version, whereas the directory of files lists all available. You can go back through the numbers until you find one that works on your system.
    – Walf
    May 20, 2022 at 3:05
  • Stockfish 15 does not work on Ubuntu 20.04 glibc
    – qwr
    Sep 16, 2022 at 8:19
  • I wonder why would an author compile software meant for public use in a bleeding edge toolchain that's incompatible with current systems. One should always use the oldest possible toolchain, so the binary it is compatible with a broader audience.
    – MestreLion
    Aug 19, 2023 at 2:20
0

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 https://github.com/official-stockfish/Stockfish#compiling-stockfish-yourself-from-the-sources

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .