How to Fix “Make: Command Not Found” Error

The Make Command Not Found error indicates that the make utility is either not installed on the system or it’s not present in the PATH variable. 

On Linux, make is often preinstalled or included with package sets like build-essential. On Mac, it’s included with the Xcode command line tools, whereas on Windows, you must manually install it.

Of course, there are ways to manually install make on Linux and Mac as well. We’ve discussed these and other fixes in further detail in the sections below.

How to Fix Make Command Not Found

As stated, you should ensure make is actually installed and present in the PATH variable. Additionally, as this issue is common with codespace, we’ve also listed a relevant fix for that.

On Linux

Depending on the Linux system, the make command may or may not be installed. If it’s installed, you should check the PATH variable. But often, it’s just not installed to start with. Do note that before you install make, you may have to update the package list first. Here’s how you can do this on various distros:

  • On Debian-based distros:
    sudo apt-get update
  • On Arch-based distros:
    sudo pacman -Syu

Next, you can install make with the following commands:

  • On Debian-based distros:
    sudo apt-get install -y make
  • On RPM distros:
    sudo yum install make
  • On Arch-based distros:
    sudo pacman -S make

If installing make like this doesn’t work, you can install it as part of the build-essential or similar set of packages.

  • On Debian-based distros:
    sudo apt install -y build-essential
  • On RPM Distros:
    sudo yum groupinstall "Development Tools"
  • On Arch-based distros:
    sudo pacman -Sy base-devel

Make is generally located in the /usr/bin or /usr/local/bin directory. These directories should already be in your PATH variable, but if not, you can add them as such:
export PATH=$PATH:/file/path

On Windows

Unlike Linux, make isn’t installed by default on Windows. We recommend using Chocolatey to install it. Here are the steps for this:

1- Press Win + R, type powershell, and press Enter.

2- Execute the following command to install choco:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(''))

3- After installing it, restart the PowerShell window and enter choco install make to install make.

If installing make doesn’t resolve the error, you should check the PATH variable. Here’s how you can do this:

1- Press Win + R, type systempropertiesadvanced, and press Enter.

2- Click on Environment Variables.

3- Check the System Variables section. If you installed make with choco, the ChocolateyInstall variable (C:\ProgramData\chocolatey) should be present there.

4- If you used another method like MinGW, you should press New and add the appropriate path (e.g., C:\MinGW\bin). Additionally, try calling make differently (e.g., MinGW32-make).

On Mac

On fresh Mac installations, you must first install the Xcode command line tools in order to use make. You can download the complete Xcode files from the developer site, or you can download Xcode from the App Store. 

With older Xcode versions, command line tools like make were bundled by default. But now, you must manually them by going to Xcode > Preferences > Downloads > Components > Install Command Line Tools.

For even newer versions, we recommend just running the xcode-select --install command in the terminal, as this will specifically install the command line tools instead of all the Xcode files.


Note: If you have homebrew installed, you can easily install make with sudo brew install make.

If make still doesn’t work, you should check the PATH variable. For older Xcode versions, you can add /Developer/usr/bin to the PATH environment variable with:
$ export PATH=$PATH:/Developer/usr/bin

For recent Xcode versions, you can instead use the following command:
export PATH=$PATH:/Applications/

Rebuild Codespace

If you’re facing this error while trying to compile anything from GitHub, the codespace might be the problem. You may be able to resolve this error by deleting the codespace and reinstalling it. You can do this from your GitHub Codespaces page.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1273

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *