Installing make Command on Mac

Page content

How to Install make Command on Mac

If you are using a Mac and trying to run the make command but getting an error that it is not found, this tutorial will guide you through the process of installing make on your Mac system.

Why make Command is Not Found on Mac

By default, the make command is not available on a fresh installation of macOS. This is because macOS does not come with the developer tools necessary for compiling software and running makefiles.

Installing make Command on Mac

To install the make command on your Mac, you can follow these steps:

  1. Open Terminal on your Mac.
  2. Install Xcode Command Line Tools by running the following command in Terminal:
    xcode-select --install
    
  3. Once the installation is complete, you can verify if make is now available by typing:
    make -v
    

If you still encounter issues after installing Xcode Command Line Tools, you can also install make using Homebrew, a popular package manager for macOS. To install make via Homebrew, follow these steps:

  1. Install Homebrew by running the following command in Terminal:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Then, install make using Homebrew:
    brew install make
    
  3. Verify the installation by typing:
    make -v
    

Conclusion

In this tutorial, you have learned why the make command is not found on a Mac system and how to install it using Xcode Command Line Tools or Homebrew. By following these steps, you should now have make available on your Mac for compiling software and running makefiles.