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

ぐ巨炮叔叔 提交于 2019-11-29 02:03:17

问题


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?


回答1:


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

OSX 10.8 xcrun (No such file or directory)




回答2:


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.



来源:https://stackoverflow.com/questions/11977648/xcrun-error-failed-to-exec-real-xcrun-no-such-file-or-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!