转的
Traceback (most recent call last):
5: from /usr/local/bin/pod:23:in <main>' 4: from /usr/local/bin/pod:23:in
load'
3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/bin/pod:55:in <top (required)>' 2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:49:in
run'
1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:130:in verify_minimum_git_version!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/command.rb:118:in
git_version': Failed to extract git version from git --version
("xcrun: error: active developer path ("/Applications/Xcode11.1.app/Contents/Developer") does not exist\nUse sudo xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install
to install the standalone command line developer tools.\nSee man xcode-select
for more details.\n") (RuntimeError)
解决
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版本。
Xcode偏好设置:
image.png image.png
网友评论