【问题标题】:xcode command line tools not able to locate gitxcode 命令行工具无法找到 git
【发布时间】:2021-06-08 11:30:46
【问题描述】:

在 Big Sur 上,我安装了 XCode CLT,但没有安装 xcode 本身。吉特工作正常。 然后我安装了 XCode,现在当我尝试运行 git 时,我收到以下消息:

git: error: Failed to determine realpath of '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk' (errno=No such file or directory)
git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -find git 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.

出现一个弹出窗口,要求安装 CLT,当我说好的时,它会下载并安装几分钟。但完成后,我又回到了开始的地方。
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk 不存在,但有10.1511.111.3 的目录。但不是10.14

【问题讨论】:

    标签: command-line-tool xcode-command-line-tools


    【解决方案1】:

    正如answer 中所发布的,您可以从这里下载缺少的 SDK:https://github.com/phracker/MacOSX-SDKs/releases

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-12
      • 2019-03-02
      • 2013-09-27
      • 1970-01-01
      • 1970-01-01
      • 2012-09-21
      • 2013-09-03
      相关资源
      最近更新 更多