Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this warning in macports:

Romans-iMac:~ holms$ sudo port -v install nginx +ssl
Error: No valid Xcode installation is properly selected.
Error: Please use xcode-select to select an Xcode installation:
Error:     sudo xcode-select -switch /Applications/ # version 4.5

Although I already used that command, warning is not disappearing, and compilation works anyway.

share|improve this question
up vote 8 down vote accepted

It looks like there are two problems going on. First, and this one's silly, you might not have accepted the XCode license agreement (See

To solve this issue, just try:

sudo xcodebuild -license # Press 'q' then type 'agree' to accept the license agreement

Secondly, the version of MacPorts installed may still be verifying XCode's installation by looking for some directories that have been re-arranged in XCode 4.4. There's a patch for this that looks like it will roll out with MacPorts 2.1.2. Or now, if you're using your own Macports build using the trunk branch of the MacPorts svn repository. (See

share|improve this answer
ok problem was that it's old macport version, and only svn version can normally support mountain lion, as it's not stable.. – holms Jul 21 '12 at 16:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.