mac安装homebrew
原创
©著作权归作者所有:来自51CTO博客作者wx62ca408a2c56b的原创作品,请联系作者获取转载授权,否则将追究法律责任
安装homebrew
执行这个脚本
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
单独浏览器输入这个url下载脚本,https://raw.githubusercontent.com/Homebrew/install/master/install.sh
然后执行这个脚本。
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch origin --force
应该是出现这个错误的原因是项目太久,tag资源文件太大。再加上网速不行。
- 方法一 加大缓存区
postBuffer的值配置成500M
git config --global http.postBuffer 524288000
github clone网速太慢了,如果有人知道怎么加速请告诉我,谢谢
结果还是失败了。
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.
Failed during: /usr/local/bin/brew update --force
解决办法
运行
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
这样命令一路操作就成功了