brew
安装东西的时候遇到了下面的错误提示
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
说是要通过第三行那个命令安装 Command Line Tools(命令行工具),第三行实际上是 xcode 的安装命令,人家说了那就执行吧,但是在执行 xcode-select --install
的时候又收到了下面的错误提示
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
说是 xcode 已经安装了,得通过软件升级来升级。确实我电脑上已经安装过 xcode 了,但是打开 xcode 也没有升级提示啊,AppStore 也没有升级提示啊。
干脆到官方给开发者提供的下载处直接去下载命令行工具(Command Line Tools)去了
- 下载地址
- 进去后使用你的苹果账号先注册成为开发者
- 然后就会跳到下载页
- 搜索「Command Line Tools」,选择符合你xcode版本(文末有查看xcode版本)的,右侧点击下载
- 下载后直接点击就能安装,就行了
然后我就成功安装了 Command Line Tools,这时候就回到最开始,继续我的 brew
安装某个东西,成功了。总体来看,就是我的 Command Line Tools 该更新了。
查看xcode版本,打开xcode,就写着呢