VMHeaven

Troubleshooting

make: command not found — install build tools the right way

The make binary is not part of a minimal Linux install. How to add it on Debian, Ubuntu, Alpine, Rocky and Alma, and what else you need to compile.

Updated 08 Aug 2026~4 min read

make is not part of a base Linux install. Server and container images ship without a compiler toolchain on purpose — it keeps them small and reduces what an attacker can do with a shell. So make: command not found is expected on a fresh box, not a sign that something is broken.

Installing make alone is usually not enough, though. A Makefile only orchestrates other tools; the actual work is done by a compiler and the headers it needs. That is why every distribution offers a bundle.

Install the toolchain, not just make

Debian and Ubuntu

Debian · Ubuntu
sudo apt update
sudo apt install -y build-essential

build-essential pulls in make, gcc, g++ and the libc headers. If you really only want the one binary, sudo apt install -y make works — expect the first compile to fail on a missing header.

Rocky, AlmaLinux, RHEL and Fedora

Rocky · Alma · RHEL · Fedora
sudo dnf groupinstall -y "Development Tools"

# newer dnf prefers
sudo dnf group install -y development-tools

Alpine

Alpine
apk add --no-cache build-base

Arch and openSUSE

Arch · openSUSE
# Arch
sudo pacman -S --noconfirm base-devel

# openSUSE
sudo zypper install -y -t pattern devel_basis

Verify

check
make --version
gcc --version
cc --version

If make answers but a build still stops immediately, read the first error rather than the last. A missing *.h file means a development package is absent — those are named libfoo-dev on Debian and libfoo-devel on the RHEL family.

“vite: command not found” and friends

A related error with a different cause. Tools like vite, tsc or eslint are project dependencies, not system commands — they live in node_modules/.bin, which is not on your PATH.

  • Run them through the package manager: npm run dev uses the script from package.json and resolves the binary correctly.
  • Or call them directly with npx vite, which looks in the local node_modules first.
  • If neither works, dependencies were never installed — run npm ci in the project directory.

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, build, then remove it again:

Debian · temporary toolchain
sudo apt install -y build-essential
make && sudo make install
sudo apt purge -y build-essential && sudo apt autoremove -y

If you need a throwaway machine for exactly this, spinning one up for a few hours is cheaper than cluttering the production host — our Standard KVM line bills monthly and deploys in about a minute.

Frequently asked

Is installing make alone enough to compile software?

Rarely. make only orchestrates the build — you also need a compiler and headers, which is what the build-essential or Development Tools bundles provide.

Does installing build tools slow down or weaken a server?

They use disk space and give an attacker who already has a shell a compiler. On a production box, build elsewhere and ship the artefact.

More in Troubleshooting

See all