【问题标题】:git: error: SDK "macosx" cannot be locatedgit:错误:无法找到 SDK“macosx”
【发布时间】:2015-05-22 04:55:50
【问题描述】:

刚刚将我的机器更新为优胜美地。我现在从 Git 收到这个错误:

git: error: SDK "macosx" cannot be located

我可以毫无问题地运行 git status,但是像 git add 这样的任何东西似乎都可以工作,但随后会引发此错误。命令行工具已安装,我尝试重新安装 Git。

【问题讨论】:

  • 您可以检查系统是否知道 sdk 路径:xcrun -sdk macosx --show-sdk-path
  • 似乎不是,我收到类似的错误,然后是xcrun: error: unable to lookup item 'Path' in SDK 'macosx'。这是什么意思?
  • xcode-select --print-path 怎么样?它应该指向/Applications/Xcode.app/Contents/Developer
  • 它指向/Library/Developer/CommandLineTools
  • 是的,重新安装 CLT,也许你没有最新版本。

标签: macos git osx-yosemite


【解决方案1】:

不确定具体是什么,但在升级过程中出现了问题。通过键入 sudo rm -r /Library/Developer/CommandLineTools 卸载 CommandLineTools,然后重新安装。我只是输入了一些 git 命令,例如:git status,然后让操作系统提示我安装 CommandLineTools。现在一切都很幸福。

【讨论】:

    【解决方案2】:

    我还收到了git: error: SDK "macosx" cannot be located,它引导我访问此页面。

    我还收到“打开的文件太多”和“无法分叉”之类的消息。

    关闭 Spotify 解决了问题。我没有重新安装 Git。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-26
      • 2022-09-26
      • 1970-01-01
      • 2021-10-04
      • 2022-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多