make: *** [Makefile:12: target] Error 1 — a recipe command failed

A command inside a Makefile rule exited with a non-zero status, so make stopped.

Exact message you may see make: *** Error 1Makefile Error 1make recipe for target failedmake: *** [all] Error 2
Seen on: Make Linux

Meaning

"Error 1" is not the problem itself; it only says the command above it failed. The real cause is the compiler or tool message printed just before that line.

Common causes

  • Compiler error in the preceding output
  • Command not found or wrong path
  • Missing file or permission problem
  • Parallel build hiding the first error

⚡ Quick fix

  1. Scroll up to the first error: line
  2. Re-run make without -j (or make -j1 V=1) to see the failing command
  3. Run the failing command manually

Detailed fix by platform

Make

  1. make -j1 V=1 2>&1 | tee build.log then search the log for "error"

How to diagnose

  1. First error — What is above?
  2. Command — Run manually?
  3. Parallel — -j hiding order?

🔧 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):

C compiler cannot create executables — configure: error: C compiler cannot create executables / no acceptable C compiler found in $PATH (C/C++)C compiler cannot cre…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…Dependency not found — meson.build: ERROR: Dependency "x" not found, tried pkgconfig and cmake (C/C++)Dependency not founddoes 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 …gcc is actually clang on macOS / make: command not found — zsh: command not found: make (macOS)gcc is actually clang…ignoring pragma omp — warning: ignoring '#pragma omp parallel' [-Wunknown-pragmas] (C/C++)ignoring pragma ompKilled signal terminated program cc1plus — g++: fatal error: Killed signal terminated program cc1plus — compilation terminated (out of memory) (C/C++)Killed signal termina…Error 1

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.