【发布时间】:2020-04-03 10:01:09
【问题描述】:
我已经在 Catalina os 中下载了最新版本的 Xcode,但问题是“pod install”命令在终端上不起作用
错误:
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.8.4/bin/pod:55:in `<top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:49:in `run'
1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("xcrun: error: active developer path (\"/Applications/Xcode.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)
【问题讨论】:
-
读取错误。它会告诉您确切的问题以及如何解决它。
-
我被困在那个步骤中什么都没有发生
-
当您安装了较新版本的 xcode 时,通常会发生此错误。命令行工具尚未初始化。要解决此问题:转到 Xcode Preferences > Locations (tab) > 底部选项是命令行工具。请选择工具的 Xcode 版本。链接:stackoverflow.com/questions/35009531/…