HomeBrew安装
1.进入官网获取安装命名(据说安装命令会更新)
官网:http://brew.sh
2.打开终端输入命令
图片中命令为:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
即可成功
3.安装成功
Installation successful!
查看是否安装成功可运行:
brew --version
4.卸载Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
5.如果上述安装均失败的话,那么看下面
(1)对!就是这种错误!
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
参考这个大神的博客
不要气馁
(2)如果还出现如下错误
Error: Failure while executing;
git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
exited with 128.
Error: Failure while executing;/usr/local/bin/brew tap homebrew/core
exited with 1.
在终端依次输入:sudo chown -R apple:staff * 和 brew doctor两个命令
是的,就是失败了这么多次。如果还失败的话,继续加油吧!