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.

sudo-apt-get-update

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 toupdate the package listfirst. Here’s how you can do this on various distros:

Next, you can install make with the following commands:

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

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

sudo-apt-get-install-make

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:

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

sudo-apt-install-build-essential

On Mac

On fresh Mac installations, you must first install the Xcode command line tools in order to use make. You can download the completeXcode 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 toXcode > Preferences > Downloads > Components > Install Command Line Tools.

export-path-linux-make

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

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

install-chocolatey-powershell

For recent Xcode versions, you can instead use the following command:export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin

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 may do this from yourGitHub Codespaces page.

environment-variables-sys-properties

path

xcode-install

xport-xcode