make: command not found — Fix for Ubuntu, Debian & macOS
make: command not found means the make build tool is not installed. On Ubuntu and Debian, it ships as part of the build-essential package. On macOS, it is included with the Xcode Command Line Tools. Both are absent from minimal VPS images and fresh macOS installs.
Fix by Operating System
Ubuntu / Debian (Most Common on VPS)
sudo apt update && sudo apt install -y build-essential
build-essential installs make, gcc, g++, libc-dev, and other tools needed to compile software from source.
Verify:
make --version
# GNU Make 4.x
CentOS / AlmaLinux / RHEL
sudo dnf groupinstall -y "Development Tools"
# or just make:
sudo dnf install -y make
Alpine Linux
apk add make
# For full build toolchain:
apk add build-base
Arch Linux / Manjaro
sudo pacman -S base-devel
macOS
xcode-select --install
A dialog will appear asking you to install the Command Line Tools. Click Install. This includes make, clang, git, and other developer tools.
If you prefer Homebrew:
brew install make
Note: Homebrew installs it as gmake by default to avoid shadowing the system version. Use gmake instead of make, or add Homebrew's gnubin to your PATH.
Why make Is Missing on VPS
Cloud and VPS images are stripped to the minimum needed to boot and run. Compilers, build tools, and headers are not installed because most server software is distributed as pre-compiled packages. If you are building from source (compiling a custom binary, installing a Ruby gem with native extensions, building Nginx with custom modules), you need to install the build toolchain first.
Common Errors After Installing build-essential
missing header files
If make succeeds but compilation fails with fatal error: stdio.h: No such file or directory:
# Install development headers
sudo apt install -y libc6-dev
# or for 32-bit headers:
sudo apt install -y libc6-dev-i386
configure: error: no acceptable C compiler found
gcc is missing or not in PATH. Confirm:
gcc --version
# if missing:
sudo apt install -y gcc
Full Compilation Workflow Example
Building a piece of software from source on a VMHeaven VPS typically looks like:
# 1. Install build tools
sudo apt update && sudo apt install -y build-essential wget
# 2. Download and extract source
wget https://example.com/software-1.0.tar.gz
tar -xzf software-1.0.tar.gz
cd software-1.0
# 3. Configure, compile, install
./configure --prefix=/usr/local
make -j$(nproc)
sudo make install
The -j$(nproc) flag runs make in parallel using all available CPU cores, significantly speeding up compilation on multi-core VPS instances.