C compiler cannot create executables C/C++ Origin: Application & API OSI layer 7 · Application Last updated 28 Nov 2026

configure: error: C compiler cannot create executables / no acceptable C compiler found in $PATH

The autoconf check could not build a test program.

Exact message you may see C compiler cannot create executablesno acceptable C compiler found in $PATHconfigure: error
Seen on: Linux Make

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 CFLAGS or LDFLAGS exported in the shell
  • Cross-compiling without --host

⚡ Quick fix

  1. Install build tools
  2. Read config.log
  3. Open config.log and read the last compiler error
  4. Unset stray CFLAGS and retry

Detailed fix by platform

Ubuntu

  1. sudo apt install build-essential

How to diagnose

  1. Log — config.log?
  2. 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:

Where this error sits

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

Could not find a package configuration file — CMake Error: Could not find a package configuration file provided by "Foo" (requested version 1.2) (C/C++)Could not find a pack…does not appear to contain CMakeLists.txt — CMake Error: The source directory does not appear to contain CMakeLists.txt (C/C++)does not appear to co…fatal error: No such file or directory — C/C++: fatal error: foo.h: No such file or directory — #include not found (C/C++)fatal error: No such …Killed signal terminated program cc1plus — g++: fatal error: Killed signal terminated program cc1plus — compilation terminated (out of memory) (C/C++)Killed signal termina…missing separator — Make: Makefile:5: *** missing separator. Stop. (spaces instead of a tab) (C/C++)missing separatorNo CMAKE_CXX_COMPILER could be found — CMake Error: No CMAKE_CXX_COMPILER could be found (C/C++)No CMAKE_CXX_COMPILER…No rule to make target — Make: *** No rule to make target 'foo.c', needed by 'foo.o'. Stop. (C/C++)No rule to make targetNo targets specified and no makefile found — make: *** No targets specified and no makefile found. Stop. (C/C++)No targets specified …C compile…

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.