I'd like to update to a 2022 version of glibc, at least 2.35. This seems to be available on Ubuntu 22.04, but how can I get it on 20.04?

  • 2
    the problem is that glibc is a system package, and a lot of things can break if you install the wrong version. what do you need it for?
    – Esther
    Commented May 11, 2022 at 21:12
  • @Esther I want those sexy new cutting-edge printf features. (It's not very important, but some code I wrote on a newer machine doesn't run on this one because it uses this feature which I didn't realize was new).
    – Jack M
    Commented May 11, 2022 at 21:21
  • 5
    stackoverflow.com/a/44710599/12642499 you can't replace the one you have, because many built-in binaries depend on it. But you can install the newer version from source in some other location, and patch your programs to use glibc from a non-default location. choosing a location for the install happens when you run ./compile --prefix=/path/to/new/glibc in the source directory, you can pass it a flag prefix which will tell it where to install, and then make to compile and install glibc there.
    – Esther
    Commented May 11, 2022 at 21:47
  • 1
    Export the LD_LIBRARY PATH environment variable to point to the location of a newer lib.
    – MarkHu
    Commented May 31, 2022 at 2:19
  • @MarkHu, pardon my ignorance, with PATH you mean the path-to-glibc-new-install/bin directory from askubuntu.com/a/1345783/123217?
    – ssi-anik
    Commented Mar 14, 2023 at 10:27

1 Answer 1


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 install

You must log in to answer this question.

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