Warning: file_get_contents(http://www.prelovac.com/deploy.csv) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /accounts/giovannidimilia/www/dimilia.it/wp-content/plugins/wp-quick-deploy/wp-quick-deploy.class.php on line 437
Macports | Giovanni Di Milia
Apr 3 2012

OS X Lion and MacPorts: how I made it work

Giovanni

Recently I received my new MacBook Air 13″ (sadly my old MacBook Aluminium is almost dead) and among all the problems I have with Lion probably the one I have with MacPorts is the most frustrating!

Someone can object with “why don’t you use Homebrew? It’s much better than Port because BLAH BLAH BLAH BLAH BLAH”, but I don’t care: I want Port working, not something else!

So after some searches around I found something that “magically” fixed everything.

The problem seems to be related to a missing setting after the installation of the Xcode. In particular the installation of the Xcode from the App Store (besides not installing by default the “Command line tools”) doesn’t set the “xcode_folder_path”.

To check if everything works it’s enough to run:

/usr/bin/xcodebuild -version

This gave me back:

xcode-select: Error: No Xcode folder is set. Run xcode-select -switch to set the path to the Xcode folder. Error: /usr/bin/xcode-select returned unexpected error.

Well, now the solution is clear! It’s enough to set the xcode_folder_path!

So I run:

sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer

where

/Applications/Xcode.app

is the path of the Xcode application installed through the App Store.

Now if you run again:

/usr/bin/xcodebuild -version

you will have

/usr/bin/xcodebuild -version Xcode 4.3.2 Build version 4E2002

All the Ports now should work! Well…. for me now they work!