22
votes

I've upgraded OSX Lion to Mountain Lion and reinstalled the Command Line Tools (as the upgrade deleted them). From then xcrun does not work anymore. The xcode-select is set to /usr/bin, the binaries are in that directory too, but if I run xcrun with an argument (ex. xcrun gcc) it displays this:

xcrun: Error: failed to exec real xcrun. (No such file or directory)

I've tried setting the path again with xcode-select and reinstalled the CLT. Nothing helped.

Any suggestions how to fix this?

2
Bump. I've tried uninstalling the command line tools with the script provided in this article: cocoanetics.com/2012/07/… and I'm still having the same problems. I reinstalled the command line tools using the separate download. Still have the same problem.bsarrazin
FYI, I found this too: thomas.bindzus.me/2012/08/17/…bsarrazin

2 Answers

74
votes

I had the same problem. Originally I was doing the following for my xcode-switch:

$ sudo xcode-select -switch /Applications/Xcode.app/

However what was really needed was:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

This fixed the problem for me. Not sure if sudo is needed.

2
votes

The only fix is hack apparently. I tried the script mentioned and it worked

OSX 10.8 xcrun (No such file or directory)