Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

produces:

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

So I know that it's there.

But macports can't find it. Any ideas?

G-Man

share|improve this question

3 Answers 3

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
1  
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
1  
That worked great! Also had to reinstall ports according to this: trac.macports.org/wiki/Migration 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 Xcode.app" in /Applications again. Needed to trash /Developer before XCode would re-install successfully, though. –  haa Jul 28 '11 at 13:04

Your Answer

 
discard

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.