xcode路径出错问题:active developer path does not exist

准备查看线上bug的时候,弹出报错提示,如下

xcrun: error: active developer path ("/Applications/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/Xcode.app/Contents/Developer这个路径出错,然后就想到自己在安装的时候改过xcode默认的名字,因此直接修改一次路径就完事了

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

我的xcode重新命名为xcode 7.3,命令中xcode后面要跟一个'',表示后面的是空格跟xcode是一体的

2017/11/6 补充一种需要执行命令的情况

在运行报错,出现的情况与上面的一致

pod install

报错日志:

    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:129:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
    from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:49:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:22:in `load'
    from /usr/local/bin/pod:22:in `<main>'
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容