Installing Command Line Tools on the Mac Using Macports
August 6th, 2008
Chances are if you have used any other nix OS then you have used a package manager to install software. Some package managers on nix: yum, aptitude, rpm, and there is fink for the mac which mainly targets open source software. Now I have never used fink, just because I first found Macports and although people complain about the speed of Macports I have never found it to be an issue. So yesterday I needed to add wget to my mac so I could easily download some files via the command line. With macports its easy, you just have to run one command: “sudo port install wget”, first you might want to make sure you have the application name right by running “port search wget”. That returns a list of programs that match your phrase and they you can run the install.
The nice thing about Macports is that it installs everything to /opt/local so that if you upgrade your OS or Apple comes out with a patch that might change things in one of your common /bin directories then everything is safe and sound and still unscathed in /opt/local.
Now apparently there is a bug in the installer that took me awhile to get past, it is supposed to be fixed in the next release but, to get around it if you get the error about running the post-flight script then go here Macports Support Issue 4 and run that script, then run “sudo port selfupdate” and you should be up and running fine.
So for the most part, you won’t have to download and compile things manually on your Mac unless of course you want to run the bleeding edge release. Happy package management. Tomorrow, some useful tools on Macports for web developers.
Leave a Reply