make: command not found? Fix It on Linux, macOS & Windows

Learn how to fix the 'make command not found' error on Linux, macOS, Windows, and Docker. Copy-paste install commands and PATH fixes to get building now.

You clone a promising repository, run ./configure, and it sails through without a hitch. Then you type make — and the terminal fires back: make: command not found. One small missing command kills the build right before success. I've been there, on fresh Ubuntu servers, on my MacBook, and inside Docker containers that looked perfectly healthy. If you're staring at the make command not found error right now, you're in good company. GNU Make is the standard build automation tool that reads instructions from a Makefile to compile software from source code. Without it, most builds from source simply stop. Here's what you need to know: this error has exactly three root causes, and once you identify which one you're dealing with, the fix is just a copy-paste away. This guide covers Linux, macOS, Windows, and Docker — no other troubleshooting page ties all four together.

From below of monitor of modern computer with opened files on blue screen

What Does "make: command not found" Mean?

The error is straightforward: your shell looked for a program named make in every directory listed in your PATH variable and didn't find one. But why it didn't find one matters. The right diagnosis saves you from blindly installing packages you may not need.

The 3 Root Causes Behind Every "Command Not Found" Error

Root cause 1: GNU Make simply isn't installed. This is the most common case. Fresh OS installs, minimal servers, and stripped-down Linux distributions often omit make entirely.

$ make
bash: make: command not found

Root cause 2: make is installed, but not in your PATH. The binary exists somewhere on your system, but your shell can't locate it because its directory isn't part of the PATH variable. This happens more often than you'd think, especially after custom installs or botched shell configurations.

$ which make
(no output)

$ ls /usr/local/bin/make
/usr/local/bin/make

Root cause 3: The environment is minimalized. Docker base images, containers, and some Windows Subsystem for Linux roots lack not just make but the entire compiler toolchain — gcc, ld, and related build tools. This is a system-level gap, not a single missing package.

$ make
/bin/sh: make: not found

Identifying which of these three applies to you first prevents wasted install attempts. That's the diagnostic framework this guide is built around.

A classic MS-DOS terminal screen displayed on a laptop keyboard with vivid illumination.

30-Second Quick Fix: Install the GNU Make Command on Any OS

If you just want make working right now, here's the table. Match your OS, copy the command, run it, verify.

OS / EnvironmentPackage ManagerCopy-Paste Command
Ubuntu / Debianaptsudo apt update && sudo apt install make
CentOS / RHEL 7yumsudo yum install make
RHEL 8+ / Fedoradnfsudo dnf install make
Arch / Manjaropacmansudo pacman -S make
macOSApple Command Line Toolsxcode-select --install
macOS (Homebrew)brewbrew install make
Windows (WSL)apt (inside WSL)sudo apt install make
Windows (Chocolatey)chocochoco install make -y
Docker (Alpine)apkapk add --no-cache build-base
After any of these, run make --version to confirm the installation worked. The sections below go deeper for each platform, including the fuller toolchain packages I'd actually recommend over the bare minimum.

How to Fix "make command not found" on Linux

Ubuntu and Debian: Install build-essential (Not Just make)

The quick table above shows apt install make. But here's what I tell everyone: if you're building software from source, you're going to need a compiler anyway. The build-essential meta-package installs make, gcc, g++, and dpkg-dev together — the full compiler toolchain most source builds expect.

sudo apt update
sudo apt install build-essential

Run sudo apt install make only if you genuinely need just make and nothing else — for example, when you're running a Makefile that calls pre-compiled tools. In my experience, that's the exception rather than the rule. When I set up a new build box, I go straight for build-essential. It saves you from the classic trap of installing make, then discovering ten minutes later that gcc is also missing.

After installation, verify:

$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu

CentOS, RHEL, and Fedora: yum and dnf Commands

The package manager depends on how old your distribution is. Legacy CentOS/RHEL 7 systems use yum:

sudo yum install make

RHEL 8 and newer, plus Fedora, use dnf:

sudo dnf install make

If you need the full toolchain, the group install is the closest equivalent to build-essential:

sudo dnf groupinstall "Development Tools"

One caveat: some minimal server images require enabling EPEL (Extra Packages for Enterprise Linux) before the make package shows up in the repos. If dnf install make comes back empty, that's usually why.

Arch Linux: pacman -S make

Arch and Manjaro users have it simple:

sudo pacman -S make

For any serious development work, install the base-devel group instead. It provides make, gcc, autoconf, and the other essentials. You can't build packages from the Arch User Repository (AUR) without base-devel, so if you use yay or paru, this group is effectively mandatory:

sudo pacman -S base-devel

How to Fix "make command not found" on macOS

macOS doesn't ship GNU Make with the base system. You get it via one of two routes.

Option 1: xcode-select --install (Apple's Official Fix)

Open Terminal and run:

xcode-select --install

A window pops up asking whether you want to install the Command Line Tools. Accept it. This installs make, clang (Apple's compiler), git, and other development utilities. The nice part? You don't need the full Xcode IDE — the Command Line Tools are a lightweight, official alternative that covers the vast majority of source builds.

If the installer window doesn't appear — which happens now and then — try resetting the tool selection first:

sudo xcode-select --reset
xcode-select --install

If that still doesn't trigger, you can download the Command Line Tools package directly from Apple's Developer portal and run it manually.

Option 2: Homebrew (brew install make)

If you're already running Homebrew — and let's face it, most macOS developers are — you can install GNU Make with:

brew install make

One wrinkle: Homebrew installs GNU Make as a "keg-only" formula. That means it won't automatically link into /usr/local/bin or /opt/homebrew/bin, because macOS already ships its own version of make via the Command Line Tools. Homebrew makes the newer GNU Make available as gmake to avoid conflicts. If you specifically need the newer version on your PATH, you can force the link:

brew link make --force

But honestly, if you're not hitting a version-specific issue, I'd stick with xcode-select --install. It's simpler, it's Apple-supported, and it gets you a working make with zero PATH fuss.

Windows: Why "make: command not found" Happens and 3 Ways to Fix It

Why Windows Defaults Have No GNU Make

Windows has never shipped GNU Make natively. CMD and PowerShell don't understand Bash-style make invocations without a Unix-compatibility layer. The make command not found in Git Bash scenario is really a missing Unix-compatible build tool — not a missing native Windows executable.

To make things more confusing, some Windows toolchains include a variant called mingw64-make (or mingw32-make). It's GNU Make compiled for Windows, but it has a different name. Build scripts that expect plain make fail even after you install it, which generates a whole second wave of confusion.

Option 1: Windows Subsystem for Linux (WSL) — Recommended

WSL gives you a genuine Linux environment on Windows 10 and 11. This is the option I recommend to anyone building software on Windows, because it sidesteps every compatibility issue at once.

wsl --install

That installs WSL2 with Ubuntu by default. Once it's ready, you're in a real Linux shell, so everything from the Linux section applies:

sudo apt update
sudo apt install build-essential

Your project's ./configure script, Makefile, and the whole Unix toolchain will work exactly as they do on a Linux server.

Option 2: Chocolatey (choco install make)

Chocolatey is the closest thing Windows has to apt or brew. In an administrative PowerShell session:

choco install make -y

This installs a native Windows port of GNU Make. One thing to verify first: make sure Chocolatey itself is installed (choco --version), because choco install make will fail with a "command not found" of its own if it isn't.

Option 3: MinGW / mingw64-make

MinGW provides a Unix-like build environment on Windows, but its make binary is named mingw64-make. If you're using Git Bash, you can set up an alias so plain make resolves correctly:

alias make=mingw64-make

This aliasing trick is exactly what fixes the "mingw64-make: command not found" scenario that surfaces in GitHub issues whenever someone tries to build a project with MinGW. Bookmark it. You'll probably need it.

Make Command Not Found in Docker? Minimal Images Need build-base

Docker plays by different rules. The entire point of a minimal base image is to be small — and that means no compiler toolchain.

Alpine-Based Docker Images: apk add build-base

Alpine Linux keeps its base image under 10MB by omitting make and every related build tool. So when your Dockerfile's RUN step tries to compile anything, you get:

/bin/sh: make: not found

The fix is to install the build-base meta-package, which bundles make, gcc, libc-dev, and binutils:

RUN apk add --no-cache build-base

The --no-cache flag skips the package index cache, keeping the layer lean. In a Dockerfile, add this in the builder stage before you run configure or make. I once watched a CI pipeline fail for three hours because the builder stage was based on Alpine and nobody had noticed make wasn't there. One line fixed it.

Debian/Ubuntu-Based Docker Images: apt-get install build-essential

For debian:latest, ubuntu:latest, or language images like node:20, the same idea applies with apt:

RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
    && rm -rf /var/lib/apt/lists/*

The --no-install-recommends flag and the rm -rf cleanup keep the image from bloating. For long-term projects, though, the cleaner pattern is multi-stage builds: install build tools in a builder stage, compile there, then copy only the compiled artifacts into the final runtime image. The build tools never make it into production.

Make Is Installed but Still "Not Found"? Diagnose Your PATH

You've installed make, but the terminal still refuses to find it. This is the PATH problem, and it's more common than people assume.

Step 1: Confirm Whether Make Actually Exists (which make)

which make

A blank result means the shell can't find make in its search path. But make might still be installed at a non-standard location:

ls /usr/bin/make
ls /usr/local/bin/make

If which make returns /usr/bin/make but your shell still errors on make, something odd is going on — an environment variable override in .bashrc or .zshrc can point PATH somewhere unexpected.

Step 2: Inspect Your PATH (echo $PATH)

The shell searches directories in the order they appear in PATH:

echo $PATH

You'll see something like:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

If /usr/bin isn't in that list, that's your problem. On macOS, the frequent culprit is missing Homebrew directories like /opt/homebrew/bin (Apple Silicon) or /usr/local/bin (Intel). A misconfigured export in a dotfile can overwrite the entire PATH with a minimal set, wiping out the standard system directories.

To check whether a specific directory is listed:

echo $PATH | tr ':' '\n' | grep bin

Step 3: Add Make's Directory to PATH Permanently (.bashrc / .zshrc)

For a temporary session fix:

export PATH="/usr/bin:$PATH"

To make it permanent, append the export to your shell configuration file. On macOS, that's ~/.zshrc by default; on most Linux setups, ~/.bashrc:

echo 'export PATH="/usr/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

For zsh:

echo 'export PATH="/usr/bin:$PATH"' >> ~/.zshrc
exec zsh

One warning: don't remove the default system bin directories from PATH to resolve what looks like a conflict. A teammate of mine once removed /usr/bin to avoid a version clash with Homebrew-installed Python. Bash promptly stopped finding everything — ls, grep, and yes, make. He spent a full afternoon undoing that change.

How to Verify Make and Run Your First Makefile

Verify with make --version

Once you've installed make, confirm it works:

$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.

If you see version and copyright information, you're good. The ancestor of GNU Make was created by Stuart Feldman at Bell Labs in 1976, which makes it one of the oldest build tools still in widespread use. That's a fun fact to impress your colleagues with — right after you unblock their build.

Create a Simple Makefile in 30 Seconds

Let's run a minimal example. Create two files in the same directory.

hello.c:

#include <stdio.h>

int main(void) {
    printf("Hello, make!\n");
    return 0;
}

Makefile:

all: hello

hello: hello.c
	gcc -o hello hello.c

clean:
	rm -f hello

Now run:

make

Make reads the Makefile, sees that hello is missing, and runs the gcc command. Run it again, and it says nothing — because hello is now up to date. That incremental rebuild behavior is precisely why make has survived for so long. It only rebuilds what changed.

Common Make Workflows: make, make install, make clean

The typical source-build sequence you'll see in README files across thousands of projects is:

./configure
make
sudo make install

./configure checks your system and generates a Makefile tailored to it. make compiles the software. make install copies the built binaries and libraries into place — usually under /usr/local, which is why it needs sudo. And make clean removes build artifacts when you want a fresh start.

GNU Make Alternatives: When Make Is Not Available or Not Enough

GNU Make is old, battle-tested, and everywhere. But it's not the only build system out there, and it's worth knowing what else exists.

CMake and Ninja as Build Systems

CMake isn't a replacement for make so much as a layer above it. It generates build files — often Makefiles — from a higher-level CMakeLists.txt configuration. You'll see it in modern C++ projects everywhere:

sudo apt install cmake

Ninja is a different beast: a small, fast build tool designed for speed, particularly in parallel builds. Large projects like Chromium and LLVM use it because it's dramatically faster than make at incremental builds:

sudo apt install ninja-build

I use both alongside make, not instead of it. They complement each other. And for the specific problem this article addresses — make: command not found — the immediate fix is still installing make, not switching build systems. You can explore alternatives once the build actually runs.

Frequently Asked Questions

Why is the make command not found on Windows?

Windows has no native GNU Make, so the error appears in Git Bash, MinGW, Cygwin, or WSL when a build script calls make. The three practical routes are: WSL (recommended — run wsl --install then sudo apt install build-essential), Chocolatey (choco install make -y in an admin PowerShell), or MinGW (alias make=mingw64-make in Git Bash). Native Windows CMD and PowerShell won't have make at all, and that's by design.

How do I fix 'make: command not found'?

Run which make first. If it returns nothing, install make via your package manager — on Ubuntu that's sudo apt update && sudo apt install build-essential. If make already exists but the shell still can't find it, inspect your PATH with echo $PATH and add the binary's directory to ~/.bashrc or ~/.zshrc using an export line. This three-step diagnosis covers the vast majority of cases.

How do I install the make command on Ubuntu?

Run sudo apt update && sudo apt install build-essential (recommended, installs make plus gcc and the full build toolchain) or sudo apt install make if you only need the make binary itself. Verify with make --version.

Is make installed by default on Linux?

Generally no, not on minimal or server installs. Some desktop distributions include make as part of their development defaults, but containers and slim images almost always omit it. The safe approach is to always verify with make --version rather than assuming it's there — I've been burned by that assumption before, and once it cost me a full debugging session.

How do I use the make command in Linux?

Create a file named Makefile with a target, its dependencies, and the commands to build them. Run make to execute the default target (usually the first one). make clean removes build artifacts, and make install copies compiled files into system directories. See the "Create a Simple Makefile in 30 Seconds" section above for a complete worked example.

Conclusion

Let's recap: the "make command not found" error has exactly three root causes — make isn't installed, make is installed but your PATH can't find it, or your environment is so minimal that the entire compiler toolchain is missing. Diagnose which one you're facing before touching anything.

The one-line fixes are worth memorizing: sudo apt install build-essential for Ubuntu and Debian, sudo dnf install make for modern RHEL/Fedora, xcode-select --install for macOS, choco install make -y for Windows, and apk add --no-cache build-base for Alpine-based Docker containers. After any install, verify with make --version, and if you're new to make, run through the simple Makefile example to confirm your toolchain works end to end.

Which platform fix solved it for you — Ubuntu, macOS, Windows, or Docker? Tell us in the comments, and share this guide with a teammate stuck on the same error. The best part is, you'll never have to search for this error message again.

← Back to Home