xcrun: error: active developer path

 

xcrun: error: active developer path ("/Applications/Xcode 4.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

今天早上,想在SVN上更新东西,在控制行内显示这个错误,百度了很多方法后,不得其解,后来发现,要学会灵活运用。

解决公式如下:

sudo xcode-select -switch (把你要用的Xcode在应用程序中的应用图标拖进来)/Contents/Developer
加sudo ,是更改它的权限

写完后是这个样子:


sudo xcode-select -switch /Applications/Xcode6.1.1.app/Contents/Developer

就齐了。

/Applications/Xcode6.1.1.app
是我的本机的Xcode的路径。再次运行就可以了!
原文地址:https://www.cnblogs.com/tanglimei/p/4218058.html