After upgrading Mac OS X to newest version Mavericks, I attempted to selfupdate my Macports, but it failed:
$ sudo port -v selfupdate ---> Updating MacPo
There might be a chance that you haven't agreed with the XCode license. If xcode-install doesn't help, you can run the belowing command to agree with Xcode license. sudo xcodebuild -license
sudo xcodebuild -license