How to run / install xcodebuild?

Rahul Iyer picture Rahul Iyer · Mar 24, 2012 · Viewed 36.1k times · Source

If I try to run xcodebuild from the command line, I receive the message:

error: can't exec '/Developer/usr/bin/xcodebuild' (No such file or directory)

But, xcrun appears to work.

Does this mean xcodebuild is not installed? I installed the command line tools in Xcode 4.3.1 Is there something I need to do to get this to work?

Answer

Kurt Revis picture Kurt Revis · Mar 24, 2012
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer