GLIBCXX not found C/C++ Origin: Application & API Last updated 15 Oct 2026

Linux: version `GLIBCXX_3.4.30' not found (required by ./app) — libstdc++.so.6

The program was built with a newer GCC than the libstdc++ installed on the machine where it runs.

Exact message you may see version `GLIBCXX_3.4.30' not foundversion `GLIBCXX_ not foundversion `GLIBC_2.34' not foundlibstdc++.so.6: version `CXXABI_ not found/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_ not found
Seen on: C/C++ Linux GCC

Meaning

Binaries link dynamically against libstdc++ and glibc. If you build on a recent distribution and copy the binary to an older one, the older library lacks the newer symbol versions. Build on the oldest target system, link statically, or ship the matching runtime.

Common causes

  • Binary built with a newer GCC than the target machine has
  • Conda or a bundled libstdc++ shadowing the system one (LD_LIBRARY_PATH)
  • Copying a binary from Ubuntu 24.04 to 20.04 or to an old container
  • Missing newer libstdc++6 package on the target

⚡ Quick fix

  1. Build on (or in a container of) the oldest OS you support
  2. Link the C++ runtime statically: -static-libstdc++ -static-libgcc
  3. Update libstdc++6 on the target if possible

Detailed fix by platform

Linux

  1. Check what is there: strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX | tail
  2. Run ldd ./app to see which library is picked up and check echo $LD_LIBRARY_PATH

GCC / Clang

  1. g++ main.cpp -o app -static-libstdc++ -static-libgcc
  2. For glibc errors build inside an older distro image (for example ubuntu:20.04)

Code examples

See which versions are available

bash
strings $(g++ -print-file-name=libstdc++.so.6) | grep GLIBCXX_3.4 | sort -V | tail -3
ldd ./app | grep -i stdc
# fix on the build side:
g++ -O2 main.cpp -o app -static-libstdc++ -static-libgcc

How to diagnose

  1. Versions — Highest GLIBCXX on the target?
  2. Library path — Which libstdc++ does ldd show?
  3. Build — Which GCC built the binary?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

AddressSanitizer: heap-buffer-overflow — C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N (C/C++)AddressSanitizer: hea…AddressSanitizer: heap-use-after-free — C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free (C/C++)AddressSanitizer: hea…call of overloaded is ambiguous — C++: error: call of overloaded 'f(int)' is ambiguous (C/C++)call of overloaded is…cannot declare variable to be of abstract type — C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions) (C/C++)cannot declare variab…command not found — bash: command not found (Linux)command not founderror while loading shared libraries — error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory (Linux)error while loading s…GLIBC_2.xx not found — /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (Linux)GLIBC_2.xx not foundGLIBCXX n…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.