【问题标题】:Installing command line developer tools for Xcode 12.2 [closed]为 Xcode 12.2 安装命令行开发人员工具 [关闭]
【发布时间】:2020-12-01 03:37:02
【问题描述】:

在全新升级到 macOS Catalina 时,我需要为 Xcode 12.2 安装命令行开发人员工具。

获取时是否点击Install安装命令行开发者工具:

在终端窗口中输入swift 后,或者我安装 downloadingCommand_Line_Tools_for_Xcode_12.2.dmg来自 developer.apple.com

我仍然得到:

:~/ > swift
xcodebuild: error: SDK "macosx10.14" cannot be located.
swift: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx10.14 -find swift 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'swift', requesting installation of command line developer tools.

建议?

【问题讨论】:

  • SO 发生了什么?诚然,这个问题缺乏深度。但是这里关于工具的问题不是很好吗?

标签: swift xcode macos-catalina


【解决方案1】:

听起来您没有安装您下载的 DMG 上的 PKG。但是如果你这样做了,听起来你需要添加这一步:

sudo xcode-select -s /Library/Developer/CommandLineTools

【讨论】:

  • 太棒了!这样做。现在在Welcome .. 消息和提示1> 之前,我得到swift: error: SDK "macosx10.14" cannot be located<unknown>:0: warning: no such SDK: 'macosx10.14',但这是一个好的开始。确实在/Library/Developer/CommandLineTools/SDKs 我有MacOSX.sdk -> MacOSX11.0.sdkMacOSX10.15.sdkMacOSX11.0.sdk,但没有MacOSX14.0.sdk。会不会是 Xcode 12.2 期待我加入 Big Sur (10.15)?
  • 没有。 Xcode 12.2 不需要 Big Sur。
  • 如果我的回答对你有用,请问你“选择”它吗?
  • 最后剩下的问题是一个棘手的问题,自 Mojave 以来一直存在 trac.macports.org/ticket/59837。推测:那些从干净的 macOS 开始的人没有问题,但是当我们安装为操作系统版本高于我们刚刚升级到的版本。
猜你喜欢
  • 2014-11-16
  • 2019-03-02
  • 2014-01-16
  • 2011-09-20
  • 1970-01-01
  • 1970-01-01
  • 2012-03-08
  • 2012-03-09
  • 1970-01-01
相关资源
最近更新 更多