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.
ubuntu - Error /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found - Stack Overflow
How to install GLIBC 2.29 or higher in Ubuntu 18.04 - Stack Overflow
Glibc_2.34 ? - Kubuntu Forums
Problem when running on Ubuntu 20.04
I've got this error with buildroot-2022.11 when executing make.
Ubuntu 20.04 - added this repo as described in the link
sudo apt update
sudo apt install libc6
It automatically installed 2.35 for me.
In my case, replace FROM go:1.21 with FROM go:1.21.0-bullseye (docker) or try tinkering there.
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
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.
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
When i tryed to run my app with Ubuntu 20.04, i got a error :
asbackup: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by asbackup) asbackup: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by asbackup) asbackup: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by asbackup)
I trying to find a web some guide, but i don't know how to fix this
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_avx2and 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 stockfishNote: 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
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
Hi, I have recently dualbooted my laptop so im still very much a linux noob and I installed VSCode with the ubuntu software app. When I try to open VSCode nothing happens, and if I use the code command I get the following error:
ERROR: ld.so: object '/usr/local/lib/x86_64-linux-gnu/libinput-config.so' from /etc/ld.so.preload cannot be preloaded (failed to map segment from shared object): ignored.
/snap/code/136/usr/share/code/bin/../code: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib/x86_64-linux-gnu/libinput-config.so)
Can someone please help me? I googled it but I can't find a solution. Thanks in advance
Edit:
Fixed it by using sudo vim on the /etc/ld.so.preload file and deleting the line /usr/local/lib/x86_64-linux-gnu/libinput-config.so.
i was trying to run an application and it gives me: ./goverlay: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by ./goverlay)
once i did the bullcrap to actually download glibc 2.34 and do ./configure --prefix=/usr && make && sudo make install and it obv broke the system. thanks god i had everythin at /home.
so how can i, like, install a newer glibc version along with the current and when i run the program, it goes where is the new glibc instaalled and use it's new libc.so.6?
Hi there...
After some updates I can't recompile xmonad, as glibc 2.34 is now required. I'm using stack to compile. Problem is I can't find an updated package of glibc to install on archlinux :(
Any ideas what I could do?