【问题标题】:How to set active developer directory with ‘xcode-select’ for Qt installation?如何使用“xcode-select”为 Qt 安装设置活动开发者目录?
【发布时间】:2016-11-06 21:15:25
【问题描述】:

我正在尝试为 mac (https://www.qt.io/) 安装最新版本的 Qt。但是当我尝试安装时出现错误。

您需要安装 Xcode http://developer.apple.com/xcode。如果已经 安装,然后使用“xcode-select”设置活动开发者目录。

我现在已经安装了xcode 7.3.1,然后在终端中运行了以下内容:

sudo xcode-select -switch /Applications/Xcode.app

但我仍然遇到同样的错误(见截图)。

谁能告诉我如何解决这个问题?

【问题讨论】:

标签: xcode macos qt


【解决方案1】:

这修正了我的错误。

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

它来自这里的答案。 https://stackoverflow.com/a/17980786/2009221

第一次单击“确定”时,错误再次出现。第二次被接受,继续安装。

【讨论】:

    【解决方案2】:

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

    【讨论】:

    【解决方案3】:

    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer 对我不起作用,因为 xcode-select 仍将目录标记为无效。我通过以下方式创建了指向 homebrew 的内部目标 xcode 开发工具目录的符号链接:

    sudo ln -s /Applications/Xcode.app/Contents/Developer /Library/Developer/CommandLineTools

    在创建上述符号链接后重新安装自制软件对我有用。

    【讨论】:

    • 这是截至 2018 年 8 月的内核:达尔文内核版本 18.0.0:2018 年 8 月 22 日星期三 20:13:40 PDT;根:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
    猜你喜欢
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-15
    • 2018-10-04
    • 1970-01-01
    • 2011-04-28
    • 1970-01-01
    相关资源
    最近更新 更多