安装homebrew Failed during: /usr/bin/sudo /usr/bin/xcode-select --install

Homebrew是一个包管理器,用于在Mac上安装一些OS X没有的UNIX工具,相当于AppStore

比如,如果我要安装 Python 的最新版本,那么传统的做法是 

 

1. 到官方网站下载 python 的最新版本 
2. 极其麻烦和小心翼翼的删除自带的 python 版本 
3. 安装新的版本 
4. 设置环境变量 

而借助 Homebrew, 需要做的仅仅是: 
brew uninstall python 
brew install python

现在说说我安装homeBrew的过程

1.打开终端输入 

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.提示

Press RETURN to continue or any other key to abort ,输入电脑用户密码会出现

Downloaded Command Line Tools (OS X 10.11) for Xcode

Installing Command Line Tools (OS X 10.11) for Xcode

等待安装完毕,会出现如下错误

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Failed during: /usr/bin/sudo /usr/bin/xcode-select --install

应为我安装了xcode默认就是安装了command line tools 

3.所以我重新输入

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

显示

Downloading and installing Homebrew...

 

Installation successful!

==> Next steps

安装成功

你可能感兴趣的:(iOS,iOS开发)