Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run macports like thus:

port install php5

When I do so, however, I get this error:

Error: Unable to open port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it? 

So I looked at my path:

declare -x PATH="/Developer/usr/bin:/opt/subversion/bin:/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" 

and then looked to make sure make was in one of those dirs:

ls -l /Developer/usr/bin/make

$ lrwxr-xr-x 1 root admin 7 Aug  7 16:47 /Developer/usr/bin/make -> gnumake

And typing:



make: *** No targets specified and no makefile found.  Stop.

So I know that it's there.

But macports can't find it. Any ideas?


share|improve this question
up vote 6 down vote accepted

You can make a symbolic link yourself:

which make (to be sure it's there)
cd /usr/bin
ln -s /Developer/usr/bin/make make

share|improve this answer

One more thing - once you install xCode 4.3 from the OS X App Store, launch xCode, then go to Preferences -> Downloads and install "Command Line Tools". Restart Terminal and you will be able to use Make.

share|improve this answer
thanks, that was necessary on OSX 10.7 – Andre Holzner Aug 6 '12 at 19:07

Have you upgraded the Mac OS since installing XCode? System updates, major ones anyway like 10.5 to 10.6, may remove those programs from /usr/bin. Download the latest Xcode and reinstall. It should put them back.

share|improve this answer
yeah, as a matter of fact, at christmas I got snow leopard. I'll try that and respond back in a bit. – GeoffreyF67 Jan 8 '10 at 16:50
That worked great! Also had to reinstall ports according to this: Thanks! – GeoffreyF67 Jan 8 '10 at 19:53
Thanks, worked for me too. Note: On OSX 10.7 Lion with XCode 4.1 downloaded from the App Store, you can re-install XCode by running the "Install" in /Applications again. Needed to trash /Developer before XCode would re-install successfully, though. – haa Jul 28 '11 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.