执行pod init 报错

报错信息:
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:118:in git_version': Failed to extract git version fromgit --version("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n") (RuntimeError) from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:130:inverify_minimum_git_version!’
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/lib/cocoapods/command.rb:49:in run' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.3/bin/pod:55:in
from /usr/local/bin/pod:22:in load' from /usr/local/bin/pod:22:in
解决方法检查一下xcode是否安装命令行工具
终端输入:xcode-select --install

你可能感兴趣的:(xcode,ios,CocoaPods)