Nearly since I’ve been using Macs with OS X MacPorts was also on board of my computer. This wonderful piece of software makes Mac OS X as useful (from the command line point of view) like Linux. After finally upgrading from Mac OS X Snow Leopard (10.6) to Mountain Lion (10.8) a few weeks ago, I’ve tried to use MacPorts today and tried to perform a selfupdate. It terminated with an error. After searching the net I finally found the reason – simply and lean:
Update your Xcode to the newest Version (4.x), start it and go to the „Preferences“ menu, open the Download tab and install the Command Line tools. Voila it works!