ld/runtime "version GLIBC_X not found" in CI
glibc uses symbol versioning. A binary linked against a newer glibc requests versioned symbols (GLIBC_2.34, etc) that an older runtime image does not provide.
What this error means
A prebuilt binary or shared library fails to load with "version GLIBC_2.XX not found (required by ...)", typically when build and run images differ.
ld
./app: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by ./app)Common causes
How to fix it
Align glibc between build and runtime
- Build on the same (or older) base image as the runtime image.
- Or upgrade the runtime image to a glibc at least as new as the build.
ld
# check the glibc a binary requires
objdump -T app | grep GLIBC_ | sort -uHow to prevent it
- Build and run on matching base images, and pin glibc-relevant base image tags so a newer build glibc never outpaces the runtime.
Frequently asked questions
What causes ""version GLIBC_X not found""?
A prebuilt binary or shared library fails to load with "version GLIBC_2.XX not found (required by ...)", typically when build and run images differ.
How do I fix "version GLIBC_X not found"?
Align glibc between build and runtime
Related guides
ld "symbol(s) not found for architecture x86_64" in CIFix ld "symbol(s) not found for architecture x86_64" in CI - the macOS linker has undefined symbols, often a…
CMake "The C++ compiler ... is not able to compile a simple test program" in CIFix CMake "The C++ compiler is not able to compile a simple test program" (ABI detection) in CI - the toolcha…
ld.gold "cannot find -lX" in CIFix ld.gold "error: cannot find -lX" in CI - the gold linker cannot locate a library because it is missing or…