Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Linux»How to Fix “Make: Command Not Found” Error

How to Fix “Make: Command Not Found” Error

Anup ThapaBy Anup ThapaSeptember 20, 2022
make-command-not-found

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.

Table of Contents

  • How to Fix Make Command Not Found
    • On Linux
    • On Windows
    • On Mac
  • Rebuild Codespace

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
    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
    sudo-apt-get-install-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
    sudo-apt-install-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
export-path-linux-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:

  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('https://community.chocolatey.org/install.ps1'))
    install-chocolatey-powershell
  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.
    environment-variables-sys-properties
  3. Check the System Variables section. If you installed make with choco, the ChocolateyInstall variable (C:\ProgramData\chocolatey) should be present there.
    path
  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.

xcode-install
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/Xcode.app/Contents/Developer/usr/bin
xport-xcode

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.

fix
Anup Thapa
  • LinkedIn

Anup Thapa is a tech writer at TechNewsToday. He mostly writes informative articles, tutorials, and troubleshooting guides related to Windows systems, networking, and computer hardware. Anup has been writing professionally for almost 5 years, and tinkering with PCs for much longer. His love for all things tech started when he got his first PC over 15 years ago. It was a Pentium IV system running Windows XP on a single 256 MB stick. He spent his formative years glued to this PC, troubleshooting any hardware or software problems he encountered by himself. Professionally, Anup has had brief forays into a variety of fields like coding, hardware installation, writing, etc. In doing so, he's worked with people of different backgrounds and skill levels, from average joes to industry leaders and experts. This has given him not just a versatile skillset, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader's problems efficiently. You can contact him at anup@technewstoday.com

Related Posts

how to change boot order on linux

How to Change Boot Order on Linux

December 16, 2022
linux terminal for windows

How to Install Linux Terminal on Windows

September 19, 2022
How-to-force-Quit-an-app-on-Linux

How to Force Quit an App on Linux

August 30, 2022
best linux for virtualbox

8 Best Linux Distros to Try in VirtualBox

August 30, 2022
ifconfig command not found

How To Fix “ifconfig Command Not Found” Error?

December 18, 2022
format usb linux

How To Format USB In Linux (5 Easy Ways)

August 22, 2022
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
Best-1200W-PSU

8 Best 1200W PSUs for Extreme PC Builds in 2023

May 16, 2023
Best-1000W-PSU

10 Best 1000W PSUs in 2023

May 16, 2023
best-700w-psu

10 Best 700W PSUs for Gaming in 2023

May 14, 2023
You may also like
antimalware service executable high memory

Fix: Antimalware Service Executable High Memory

May 18, 2023
printer-printing-pink

Why is My Printer Printing Pink? 6 Ways to Fix It

May 18, 2023
how to clean usb c port

How to Clean USB-C Port Safely

May 17, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.