xcode-select --install

如果你不是一名 iOS 或 OS X 开发者,可以跳过安装 XCode 的过程,直接安装 Xcode command line tools 。安装完成后,你将可以直接在 terminal 中使用主要的命令,比如:make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp 等等。

参考:https://aaaaaashu.gitbooks.io/mac-dev-setup/content/XCode/index.html