首先弄清楚Command Line Tools 是什么
是Command Line Tools,这两者的关系其实不大,你可以在不安装Xcode的情况下安装Command Line Tools,而安装Xcode的情况
是默认安装Command Line Tools 的
理解了 Command Line Tools(类似于gcc)就可以了
1 看看自己的电脑有没有安装Command Line Tools
没有安装的话安装一下xcode-select --install # 单独安装CommandLineTools,不需要Xcode
2指定Command Line Tools 的路径
sudo xcode-select --switch /Library/Developer/CommandLineTools # 指定路径
解决!!!!!