我不是搞 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 么?
![]() | 1 defunct9 2017-07-11 20:23:18 +08:00 via iPhone ![]() 是的,必须装 |
![]() | 2 hguandl 2017-07-11 20:31:00 +08:00 ![]() 没有这样特地试验过,不过如果缺少命令行组件的话使用 Homebrew 是个好选择,直接 brew install automake 试试看。 |
![]() | 3 Echoldman 2017-07-11 22:31:53 +08:00 ![]() 装上 Xcode,make 那一套基本都全了 |
4 xiaosaiyin 2017-07-12 16:05:59 +08:00 终端直接运行 make,弹出提示窗口,选择安装 command line tool,安装好就能用了 |
![]() | 5 HanningWu OP @xiaosaiyin 没有提示窗口弹出。 |