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.
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 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++6package on the target
⚡ Quick fix
- Build on (or in a container of) the oldest OS you support
- Link the C++ runtime statically:
-static-libstdc++ -static-libgcc - Update
libstdc++6on the target if possible
Detailed fix by platform
Linux
- Check what is there:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX | tail - Run
ldd ./appto see which library is picked up and checkecho $LD_LIBRARY_PATH
GCC / Clang
g++ main.cpp -o app -static-libstdc++ -static-libgcc- For glibc errors build inside an older distro image (for example
ubuntu:20.04)
Code examples
See which versions are available
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-libgccHow to diagnose
- Versions — Highest GLIBCXX on the target?
- Library path — Which libstdc++ does ldd show?
- 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:
Similar errors
- AddressSanitizer: heap-buffer-overflow C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N
- AddressSanitizer: heap-use-after-free C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free
- call of overloaded is ambiguous C++: error: call of overloaded 'f(int)' is ambiguous
Most viewed in C/C++
- terminate called after throwing an instance of C++: terminate called after throwing an instance of 'std::out_of_range' — what(): vector::_M_range_check
- double free or corruption C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped)
- undefined reference to C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 15 Oct 2026