224

Just upgraded my computer to Mac OS X Lion and went to terminal and typed "make" but it says: -bash: make: command not found

Where did the "make" command go?

Frank
  • 64,140
  • 93
  • 237
  • 324
Roman Kagan
  • 10,440
  • 26
  • 86
  • 126
  • 5
    Mysterious to me that this question is considered off-topic. – Grumdrig Jan 20 '12 at 19:17
  • the same problem and the same solution for mountain lion – bjelli Aug 20 '12 at 12:28
  • 8
    OMG how can they distribute a unix system without make *sheesh* – Gus Jan 11 '13 at 18:33
  • 1
    Instead of downloading 1.6GB Xcode you can download 113MB Command Line Tools from Apple - answer below by @Nick White http://stackoverflow.com/questions/6767481/where-can-i-find-make-program-for-mac-os-x-lion#answer-10565501 – Dylan Valade Mar 22 '13 at 16:30

9 Answers9

531

You need to install Xcode from App Store.

Then start Xcode, go to Xcode->Preferences->Downloads and install component named "Command Line Tools". After that all the relevant tools will be placed in /usr/bin folder and you will be able to use it just as it was in 10.6.

Abdul Rahman
  • 2,097
  • 4
  • 28
  • 36
Tarmo
  • 5,862
  • 2
  • 19
  • 12
  • 41
    And don't forget to run "/Applications/Install Xcode.app". (This stumped me for a while). – njamesp Jul 22 '11 at 20:59
  • 13
    I upgraded to Lion, reinstalled Xcode and make was still not in my path. I tracked it down in: /Developer/usr/bin/make – CJ. Jul 27 '11 at 15:15
  • 9
    ... which now seems to be (with the latest version): `/Applications/Xcode.app/Contents/Developer/usr/bin/` – Paul Peelen Mar 05 '12 at 17:53
  • 5
    I didn't have to run "/Applications/Install Xcode.app". Using 4.3.2, drag'n'dropped Xcode to the Applications folder, then just went to Preferences->Downloads and installed from there. Now 'make' works from the command line. – Teekin May 04 '12 at 14:46
  • why not adding /Applications/Xcode.app/Contents/Developer/usr/bin to $PATH? – chunkyguy Aug 10 '12 at 04:19
  • If you still have an old Xcode installed and are using an app launcher (like LaunchBar), you may still be using the old Xcode, although you already have installed the new one... – pesche Jun 23 '13 at 13:45
49

Have you installed Xcode and the developer tools? I think make, along with gcc and friends, is installed with that and not before. Xcode 4.1 for Lion is free.

Cajunluke
  • 3,103
  • 28
  • 28
  • 5
    go to the Downloads tab within the Xcode Preferences menu and click "Install" next to the Command Line Tools entry – williamC Aug 27 '13 at 15:41
  • Scroll down to @Tarmo 's answer to see how to do it in 2013. – rych Oct 11 '13 at 00:16
  • Indeed, installing new Xcode resolved my problem. Unfortunately I didn't know that after doing a Mac OS X upgrade I also have to upgrade to the latest Xcode version. – Roman Kagan Jul 20 '11 at 20:05
31

It appears you can install the command line tools without getting Xcode from Downloads for Apple Developers. It required me to login with my apple account.

Alternatively, once you install Xcode from the app store, you might notice the command line tools are not installed by default. Open Xcode, go to preferences, click to the "downloads" tab, and from there you can download and install command line tools.

Nick White
  • 2,063
  • 16
  • 10
21

Xcode 4.3.2 didn't install "Command Line Tools" by default. I had to open Xcode Preferences / Downloads / Components Tab. It had a list of optional components with an "Install" button beside each. This includes "Command Line Tools" and components to support developing for older versions of iOS.

Now "make" is available and you can check by opening terminal and typing:make -v

The result should look like:GNU Make 3.81

You may need "make" even if you don't need Xcode, such as a Perl developer installing Perl Modules using cpan -i on the commandline.

Able Mac
  • 846
  • 7
  • 8
4

Xcode 5.1 no longer provides command line tools in the Preferences section. You now go to https://developer.apple.com/downloads/index.action, and select the command line tools version for your OS X release. The installer puts them in /usr/bin.

3

If you installed xcode and upgraded to mountain lion, or you don't have the latest command line tools installed, or you have zsh or other shells, you can shortcut to some of the embedded tools in the developer directory with:

xcrun make
Matthew F. Robben
  • 1,906
  • 1
  • 12
  • 6
3

After upgrading to Mountain Lion using the NDK, I had the following error:

Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it

Error was fixed by downloading and using the latest NDK

Bruno Vieira
  • 3,884
  • 1
  • 23
  • 35
Andy
  • 31
  • 1
3

If you need only make and friends. Try installing the command-line-tools provided by Apple. (Assuming you are not doing any iOS development.)

Gaurav Agarwal
  • 14,664
  • 4
  • 29
  • 41
0

there are specific builds of command line tools for different major OSX versions available from the Downloads for Apple Developers site. Be sure to get the latest release of the version for your OS.