9

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

GeoffreyF67
  • 497
  • 2
  • 7
  • 14

3 Answers3

11

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.

rlabatt
  • 111
  • 1
  • 2
8

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.

Jeff Snider
  • 3,252
  • 17
  • 17
  • yeah, as a matter of fact, at christmas I got snow leopard. I'll try that and respond back in a bit. – GeoffreyF67 Jan 08 '10 at 16:50
  • 1
    That worked great! Also had to reinstall ports according to this: http://trac.macports.org/wiki/Migration Thanks! – GeoffreyF67 Jan 08 '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
6

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

terrace
  • 176
  • 1
  • 2