Cocoapod错误 - Xcode6.4

当我从Xcode 6.3切换到Xcode6.4的时候,由于我是mac上安装了两个不一样的版本,如今把Xcode 6.3卸掉了。
如今再次运行pod install命令的时候,提示以下错误:
 
Updating local specs repositories
xcrun: error: active developer path ("/Applications/Xcode6.3/Xcode.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`)
 
大体意思就是/Applications/Xcode6.3/Xcode.app/Contents/Developer这个路径找不到了。
由于我已经卸载掉了Xcode6.3,天然就找不到了。哈哈
因此要把路径切换到新的Xcode6.4下。
 

因此 运行一下命令行:

sudo xcode-select -switch /Applications/Xcode\ 6.4/Xcode.app/Contents/Developer 
 
意思就是把选择Xcode路径切换到/Applications/Xcode\ 6.4/Xcode.app/Contents/Developer 这个路径下。
 
再次运行pod install就一切正常了。
 
总结:当不是经过系统自动升级,而是又从新下载一个安装包安装Xcode的时候,可能会出现这个问题。只须要运行一下命令就好了。
相关文章
相关标签/搜索