福满园农家院,大汉女帝,中吴论坛
今天做项目的时候,执行pod update报了如下错误信息:
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in
git_version': failed to extract git version from
git --version("xcrun: error: active developer path (\"/users/feiwei/desktop/xcode.app/contents/developer\") does not exist\nuse
sudo xcode-select --switch path/to/xcode.appto specify the xcode that you wish to use for command line developer tools, or use
xcode-select --installto install the standalone command line developer tools.\nsee
man xcode-select` for more details.\n") (runtimeerror)
粗略一看,应该是找不到git。为什么找不到?首先,有可能没有安装git;其次,可能是关联路径不对。
1.没有安装git
可以在终端执行:xcode-select --install。如果你的电脑系统更新了,有可能这个命令解决不了你的问题,那么,这时候需要到git官网下载安装,下载链接https://git-scm.com/download/mac。
2.关联路径不对
这个问题可以使用命令:sudo xcode-select --switch /users/feiwei/downloads/xcode.app,其实这个命令就是指定xcode的安装目录。如果你不知道安装路径,或者不想用命令,xcode -->preferences-->locations并选择command line tools,看看是否选择了当前xcode版本。
简书:
csdn:
ps:本文原创发于微信公众号longyoung,关注并回复「51电子书」免费领取程序员必读经典电子书。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
iOS 使用UITextField自定义搜索框 实现用户输入完之后“实时搜索”功能
网友评论