一、问题描述
删除 XCode
之后, 安装 gcc
时提示安装 Command Line Developer Tools
之后执行 xcode-select --install
出现以下报错:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
二、解决方案
$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
如果还是报错,则加上 sudo
,
$ sudo rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --install