Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
遇到这个错误有几种解决办法
第一种
git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
第二种
您应该安装命令行工具。
运行xcode-select --install安装它们。
如果在遇到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 rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --install
如果还有错误,那么就
用法:xcode-select -print-path
或:xcode-select -switch
或:xcode-select -version
查看如果有版本号,那么你就可以再次安装brew了
后面安装过程就会正常了
使用 brew doctor来诊断
安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
使用 brew -v 来判断是否安装成功
卸载
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"