I am having trouble getting MacPorts to function properly. I just installed OSX Lion 10.7.3 I downloaded and installed MacPorts first, and then after reading the requirements, I
In theory this should work if you have Xcode4.3 installed (in /Applications):
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
(And you've installed the optional command line tools)