我刚刚把我的电脑升级到了Yosemite系统,现在Git出现了如下错误:
git: error: SDK "macosx" cannot be located
我可以正常运行git status
命令,但是像git add
这样的命令似乎可以执行,但随后会抛出以下错误。已安装命令行工具,我尝试重新安装Git。
我刚刚把我的电脑升级到了Yosemite系统,现在Git出现了如下错误:
git: error: SDK "macosx" cannot be located
我可以正常运行git status
命令,但是像git add
这样的命令似乎可以执行,但随后会抛出以下错误。已安装命令行工具,我尝试重新安装Git。
在升级过程中,某些东西出了问题,但不确定是什么。通过输入 sudo rm -r /Library/Developer/CommandLineTools
来卸载 CommandLineTools,然后重新安装即可解决问题。我只是输入了一些像 git status
这样的 git 命令,然后让操作系统提示我安装 CommandLineTools。现在一切都很正常。
我也遇到了 git: error: SDK "macosx" cannot be located
的错误,这让我来到了这个页面。
我还收到了“打开的文件太多”和“无法分叉”的消息。
关闭 Spotify 解决了我的问题。我没有重新安装 Git。
xcrun: error: unable to lookup item 'Path' in SDK 'macosx'
。这是什么意思? - sethro/Library/Developer/CommandLineTools
。 - sethrosudo xcode-select -s /Applications/Xcode.app/Contents/Developer
命令。如果你的 Xcode 安装在其他位置,请相应调整路径。 - baf