Short answer: make: command not found means make is not installed. Server and container images ship without a compiler toolchain on purpose, and make goes with it. Install your system’s build bundle, which brings make, a C compiler and the headers a build needs:
sudo apt update
sudo apt install -y build-essentialOn Alpine it is apk add build-base, on macOS xcode-select --install, and on Windows winget install ezwinports.make or a WSL shell. Afterwards make --version prints the version. The sections below cover each system and the errors that look similar but are not about make at all.
Why a bundle and not just make: a Makefile only orchestrates other tools. The actual work is done by a compiler and the headers it needs, so make alone gets you one step further, to the next “not found”.
Which error do you see?
The Linux lines are what bash, dash, zsh and BusyBox ash print when make is missing, and what GNU make 4.3 prints when the compiler is; the PowerShell wording comes from PowerShell’s own source.
| Message | Where you see it | Go to |
|---|---|---|
bash: make: command not found | bash on Linux, or Git Bash on Windows | Install |
-bash: make: command not found | bash as login shell over SSH | Install |
Command 'make' not found, but can be installed with: | Ubuntu's command-not-found helper | Debian and Ubuntu |
/bin/sh: 1: make: not found | dash (Debian, Ubuntu) in a Dockerfile RUN line or a cron job; a #!/bin/sh script prints its own name and line instead, as in ./build.sh: 3: make: not found | Docker |
/bin/sh: make: not found | the same on Alpine images (BusyBox) | Docker |
zsh: command not found: make | zsh, the macOS default: on a Mac PATH is broken (on Linux, make is missing) | macOS |
xcode-select: note: No developer tools were found, requesting install. | macOS without the Command Line Tools | macOS |
'make' is not recognized as an internal or external command, | Windows cmd | Windows |
The term 'make' is not recognized as a name of a cmdlet, function, script file, or executable program. | PowerShell 7 (5.1: "as the name of a cmdlet, function, script file, or operable program") | Windows |
gyp ERR! stack Error: not found: make | npm building a native module with node-gyp | npm and node-gyp |
make: cc: No such file or directory | make runs; the compiler is missing | Compiler missing |
make: *** No targets specified and no makefile found. Stop. | make runs; there is no Makefile here | No makefile |
Install the toolchain, not just make
Debian and Ubuntu
sudo apt update
sudo apt install -y build-essentialbuild-essential pulls in make, gcc, g++, the C library headers (libc6-dev) and dpkg-dev. The name is the same on Debian 12 and 13 and Ubuntu 22.04 and 24.04. On Ubuntu, a missing command answers with Command 'make' not found, but can be installed with: and the packages that contain a make binary. Those give you make alone; build-essential is what a build needs. If you really only want the one program, sudo apt install -y make works; expect the first compile to fail on a missing compiler.
Rocky, AlmaLinux, RHEL and Fedora
sudo dnf groupinstall -y "Development Tools"sudo dnf group install -y c-developmentOn the RHEL family, the “Development Tools” group contains make, gcc and gcc-c++. Fedora splits it differently: its development-tools group holds git, patch and similar tools but no compiler, while c-development has make, gcc and gcc-c++. dnf5 also dropped the groupinstall spelling. When in doubt, sudo dnf install -y make gcc gcc-c++ works everywhere in the family.
Alpine
apk add --no-cache build-basebuild-base depends on make, gcc, g++, binutils, libc-dev, fortify-headers, file and patch. Run it as root, or with doas, since Alpine has no sudo by default.
Arch and openSUSE
sudo pacman -S --needed base-develsudo zypper install -y -t pattern devel_basismake on macOS
Every Mac has /usr/bin/make, but until the Xcode Command Line Tools are installed it is only a stub. Running it opens a dialog that offers to install them, and the terminal prints a line starting xcode-select: note: No developer tools were found, requesting install. Accept the dialog, or start the install yourself:
xcode-select --installThat brings make, clang (also answering to cc and gcc) and git. Apple ships GNU Make 3.81, which most Makefiles are fine with. After a macOS upgrade the tools can break, and make or git stop with xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun; the same command repairs it. zsh: command not found: make on a Mac therefore does not mean make is missing: PATH has lost /usr/bin, usually through a line in ~/.zshrc that sets PATH without $PATH.
A project that needs GNU make 4 can get it from Homebrew: brew install make. Homebrew installs it as gmake, so Apple’s make stays in place. To have the new one answer to make, put its gnubin directory first, as the formula suggests:
export PATH="$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$PATH"An Intel Mac without Homebrew cannot get it that way any more: a new Homebrew install there stops with Homebrew on macOS is only supported on Apple Silicon processors!. MacPorts packages GNU make as gmake too: sudo port install gmake.
make on Windows: ‘make’ is not recognized
Windows has no make, and Git for Windows does not add one. In cmd the message is 'make' is not recognized as an internal or external command, with operable program or batch file. on the next line. PowerShell prints the “The term ‘make’ is not recognized” line from the table, and Git Bash says bash: make: command not found. The quickest install is winget:
winget install ezwinports.makeThat is GNU make 4.4.1 as a native Windows program, registered as the command make. Open a new terminal before using it; a window that was already open keeps its old PATH. Other routes to the same thing:
choco install makepacman -S makeMinGW toolchains, including MSYS2’s mingw-w64-ucrt-x86_64-make package, name the program mingw32-make.exe. That is why make is “not recognized” on a machine where mingw32-make works fine; call it by that name. A Makefile written for Linux also calls rm -rf, cp or sed with Unix options, which Git Bash understands and cmd does not. For builds like that, wsl --install gives you Ubuntu, where the Debian and Ubuntu command applies.
make in Docker images and CI
The official debian, ubuntu and alpine images have no make, and neither do the -slim and -alpine variants of language images such as node and python. The full node:22 and python:3.13 images are built on buildpack-deps and already contain make and gcc. In a Dockerfile the error reads /bin/sh: 1: make: not found on a Debian or Ubuntu base and /bin/sh: make: not found on Alpine. Install the toolchain in the image:
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*RUN apk add --no-cache build-baseTo keep the compiler out of the image you ship, build in one stage and copy only the result into a slim one:
FROM debian:13-slim AS build
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
RUN make
FROM debian:13-slim
COPY --from=build /src/BINARY /usr/local/bin/BINARYnpm install fails with “not found: make”
An npm package with native code that has no prebuilt binary for your platform is compiled on install by node-gyp, which needs Python 3, make and a C/C++ compiler on Linux. Without make it stops with gyp ERR! stack Error: not found: make. Install the toolchain plus Python, then run npm install again:
sudo apt install -y build-essential python3apk add --no-cache build-base python3On macOS the Command Line Tools cover it. On Windows, node-gyp uses Visual Studio’s C++ build tools instead of make.
make: cc: No such file or directory
Here make ran, and the compiler it called does not exist. This is GNU make 4.3 on Debian 12 with no compiler installed:
cc hello.c -o hello
make: cc: No such file or directory
make: *** [<builtin>: hello] Error 127A Makefile that names gcc gives make: gcc: No such file or directory. When the recipe line goes through the shell, for instance because it contains && or a pipe, the shell reports it instead: /bin/sh: 1: gcc: not found. Error 127 is the exit status for “command not found” either way. The fix is the bundle from the install section.
Once the compiler is there, the next stop is often a header, such as fatal error: zlib.h: No such file or directory. That means a development package is missing: those end in -dev on Debian, Ubuntu and Alpine (zlib1g-dev on Debian, zlib-dev on Alpine) and in -devel on the RHEL family (zlib-devel). Read the first error of a failed build, not the last.
make: *** No targets specified and no makefile found
make works; there is just no Makefile in the current directory. Change into the project directory. If it has a configure script, run ./configure first, which writes the Makefile. A CMakeLists.txt means CMake generates it: cmake -B build, then cmake --build build. The related make: *** No rule to make target 'install'. Stop. means the Makefile exists but has no target of that name.
Verify
make --version
cc --version
command -v makeThe first line of the output names the version, GNU Make 4.3 on Debian 12 or GNU Make 3.81 on macOS. If the package is installed but your open shell still says not found, it remembered the earlier miss: run hash -r in bash or rehash in zsh, or open a new terminal.
A similar-looking error has nothing to do with build tools: vite, tsc and eslint are project dependencies in node_modules/.bin, not system commands, so installing anything with apt will not fix them. That case has its own guide: vite: command not found.
Should build tools live on a production server?
Preferably not. A compiler on a production host costs disk space and hands anyone who gains a shell the ability to build their own tooling in place. The cleaner pattern is to compile on a build machine or in CI and ship the finished artefact: a binary, a container image or a tarball.
Where you do need to compile on the target, install the toolchain:
sudo apt install -y build-essentialBuild and install the software, in its source folder:
make && sudo make installThen remove the toolchain again:
sudo apt purge -y build-essential && sudo apt autoremove -yA separate small build VPS, billed monthly, keeps the compiler off production for good. Our Standard KVM line deploys in about a minute.
Another tool missing, or a directory to add to PATH for good in bash, zsh and fish? See command not found: the three causes and the fix for every tool.
Frequently asked
Is installing make alone enough to compile software?
Rarely. make only runs the build; the compiler and headers come from build-essential on Debian and Ubuntu, build-base on Alpine or the Development Tools group on Rocky, AlmaLinux and RHEL. Install the bundle, not just make.
How do I fix 'make' is not recognized on Windows?
Windows has no make. Install GNU make with 'winget install ezwinports.make' (or 'choco install make', or 'pacman -S make' in MSYS2) and open a new terminal. MinGW toolchains name it mingw32-make. For Makefiles written for Linux, WSL with build-essential is the most reliable route.
How do I get make on macOS?
Run xcode-select --install. The Command Line Tools bring GNU Make 3.81, clang and git, and the same command fixes 'xcrun: error: invalid active developer path' after a macOS upgrade. For GNU make 4, run brew install make and call it as gmake.