Mac ports installation software prompts “warning: xcodebuild exists but failed to execute”


# port search imagemagick

checked on the Internet, tried the following method, success.

The steps which solved for me were:

1.install Xcode 4.3 from Mac App Store

2. Install Command Line Tools for Xcode

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

4. sudo ln -s `which clang` /Applications/Xcode.app/Contents/Developer/usr/bin/

Even so, this is clearly a workaround.

my xcode is downloadable DMG, perform dynamic mount every time I start, so the directory is /Volumes/ xcode. app/…

for users from appstore installation goal should be to/Application/Xcode. The app /…

, I only have to do step3 to succeed.

Read More: