HanningWu
V2EX  ›  Xcode

没装 Xcode 不能使用 make 命令?

  •  
  •   HanningWu · Jul 11, 2017 · 5387 views
    This topic created in 3242 days ago, the information mentioned may be changed or developed.

    我不是搞 iOS/macOS/watchOS/tvOS 开发的,所以 Xcode 对我来说没什么用。但会频繁使用到 Command Line Tools 的命令,所以我用xcode-select install命令安装了独立的 CLT。

    然而,我发现独立的 CLT 无法使用 make 命令。

    在终端里运行make之后报错是这样的:

    xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
    Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
    See `man xcode-select` for more details.
    

    它让我用xcode-select --install命令去装独立的 CLT,可是 CLT 已经装在电脑里了,而且我还卸载重装了一遍。仍然出现这个问题。所以说我想要使用 make 命令,就必须在电脑里装一个臃肿的 Xcode 么?

    5 replies    2017-07-12 20:51:15 +08:00
    defunct9
        1
    defunct9  
       Jul 11, 2017 via iPhone   ❤️ 1
    是的,必须装
    hguandl
        2
    hguandl  
       Jul 11, 2017   ❤️ 2
    没有这样特地试验过,不过如果缺少命令行组件的话使用 Homebrew 是个好选择,直接 brew install automake 试试看。
    Echoldman
        3
    Echoldman  
       Jul 11, 2017   ❤️ 1
    装上 Xcode,make 那一套基本都全了
    xiaosaiyin
        4
    xiaosaiyin  
       Jul 12, 2017
    终端直接运行 make,弹出提示窗口,选择安装 command line tool,安装好就能用了
    HanningWu
        5
    HanningWu  
    OP
       Jul 12, 2017
    @xiaosaiyin 没有提示窗口弹出。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2599 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 15:53 · PVG 23:53 · LAX 08:53 · JFK 11:53
    ♥ Do have faith in what you're doing.