xcode 命令行工具无法定位 git

时间:2021-06-08 11:30:46

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

在 Big Sur,我安装了 XCode CLT,但没有安装 xcode 本身。 Git 工作正常。 然后我安装了 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

1 个答案:

答案 0 :(得分:0)

如本 answer 中所述,您只需从此处下载缺少的 SDK:https://github.com/phracker/MacOSX-SDKs/releases

相关问题