mac 系统升级,升级之后,使用命令行工作时候,报错了,“xcrun: error: invalid active developer path, missing xcrun”,使用下面的命令
xcode-select --install
安装之后,执行
$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
能够看到类似信息,就表明安装是成功的!