configure: error: C compiler cannot create executables / no acceptable C compiler found in $PATH
The autoconf check could not build a test program.
C compiler cannot create executablesno acceptable C compiler found in $PATHconfigure: error Meaning
The configure script compiles and runs a trivial C program. If that fails it aborts. The real reason — missing compiler, missing libc headers, bad CFLAGS, or a cross-compiler without sysroot — is recorded at the end of config.log.
Common causes
- No compiler
- Missing build-essential
- Broken CFLAGS
- Wrong
CFLAGSorLDFLAGSexported in the shell - Cross-compiling without --host
⚡ Quick fix
- Install build tools
- Read
config.log - Open
config.logand read the last compiler error - Unset stray
CFLAGSand retry
Detailed fix by platform
Ubuntu
sudo apt install build-essential
How to diagnose
- Log — config.log?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🔧 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
- Could not find a package configuration file CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2)
- does not appear to contain CMakeLists.txt CMake Error: The source directory does not appear to contain CMakeLists.txt
- fatal error: No such file or directory C/C++: fatal error: foo.h: No such file or directory — #include not found
Most viewed in C/C++
- AddressSanitizer: heap-use-after-free C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free
- AddressSanitizer: heap-buffer-overflow C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N
- Bus error C/C++: Bus error (core dumped) — SIGBUS from misaligned access or a bad memory-mapped file
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 28 Nov 2026