执行pod install提示git版本错误

升级系统运行pod install出现如下错误:

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/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.5.0/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/bin/pod:55:in `'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `
'

于是按照提示去查看git版本然后报错

 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

这个时候发现其实是升级了Mac系统导致的,需要xcode-select重新安装。
于是执行安装xcode-select指令:

xcode-select --install

安装完成之后查看git版本发现git可以用了,再执行pod install也没有了问题。

可能有说的不对的地方,请大家多指正。

你可能感兴趣的:(执行pod install提示git版本错误)