why can't macports find make
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
Solution 1:
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
Solution 2:
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.
Solution 3:
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.