I am currently running a Ubuntu 22.04 VM. It has by default Glibc 2.35. Due to a security vulnerability, I am trying to upgrade it to 2.39.
I followed the following steps to download the gzipped binary and compile it on my system:
sudo apt-get install gawk bison -ywget -c https://ftp.gnu.org/gnu/glibc/glibc-2.39.tar.gztar -zxvf glibc-2.39.tar.gz && cd glibc-2.39mkdir glibc-build && cd glibc-build../configure --prefix=/opt/glibc-2.39make sudo make install
This compiles and installs successfully. This is the last 10 lines of stdout:
#23 43.04 if test -r /opt/glibc/include/gnu/stubs-64.h && cmp -s /root/workspace/teams/glibc-2.39/glibc-build/stubs.h /opt/glibc/include/gnu/stubs-64.h; \#23 43.04 then echo 'stubs.h unchanged'; \#23 43.04 else /usr/bin/install -c -m 644 /root/workspace/teams/glibc-2.39/glibc-build/stubs.h /opt/glibc/include/gnu/stubs-64.h; fi#23 43.05 rm -f /root/workspace/teams/glibc-2.39/glibc-build/stubs.h#23 43.05 test ! -x /root/workspace/teams/glibc-2.39/glibc-build/elf/ldconfig || LC_ALL=C \#23 43.05 /root/workspace/teams/glibc-2.39/glibc-build/elf/ldconfig \#23 43.05 /opt/glibc/lib /opt/glibc/lib#23 43.07 make[1]: Leaving directory '/root/workspace/teams/glibc-2.39'#23 DONE 43.4s
But after this when I try to run ldd --version
, it still points to the old version, i.e 2.35.
How can I point ldd to pick up my latest compiled Glibc library?