V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
HanningWu
V2EX  ›  Xcode

没装 Xcode 不能使用 make 命令?

  •  
  •   HanningWu · 2017-07-11 20:15:56 +08:00 · 4333 次点击
    这是一个创建于 2452 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我不是搞 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 条回复    2017-07-12 20:51:15 +08:00
    defunct9
        1
    defunct9  
       2017-07-11 20:23:18 +08:00 via iPhone   ❤️ 1
    是的,必须装
    hguandl
        2
    hguandl  
       2017-07-11 20:31:00 +08:00   ❤️ 2
    没有这样特地试验过,不过如果缺少命令行组件的话使用 Homebrew 是个好选择,直接 brew install automake 试试看。
    Echoldman
        3
    Echoldman  
       2017-07-11 22:31:53 +08:00   ❤️ 1
    装上 Xcode,make 那一套基本都全了
    xiaosaiyin
        4
    xiaosaiyin  
       2017-07-12 16:05:59 +08:00
    终端直接运行 make,弹出提示窗口,选择安装 command line tool,安装好就能用了
    HanningWu
        5
    HanningWu  
    OP
       2017-07-12 20:51:15 +08:00
    @xiaosaiyin 没有提示窗口弹出。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4692 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:08 · PVG 09:08 · LAX 18:08 · JFK 21:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.