Mac安装brew报错汇总

背景:在 Mac 终端输入了 Homebrew 官网给的安装指令:

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

问题1

执行命令报错权限问题
报错

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

如图:
在这里插入图片描述
解决方法:
执行命令sudo gem install redis,之后再次执行安装命令,完美解决

问题2

安装过程中出现了错误:

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 --force

如图:
在这里插入图片描述
网上说是网络问题,确实ping github.com是有问题的
解决办法:
执行命令

sudo vi /etc/hosts

在最后一行添加13.229.188.59 github.com
保存退出后再次ping github.com,OK,完美解决

问题3

重新安装还是报错

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

如图
在这里插入图片描述
究其原因是因为curl的postBuffer的默认值太小,我们需要调整它的大小,在终端重新配置大小

在暂且把postBuffer的值配置成500M,对我来说够了。可以根据你需要下载的文件大小,将postBuffer值配置成合适的大小。

git config --global http.postBuffer 524288000

这样已经配置好了,如果你不确定,可以根据以下命令查看postBuffer。

git config --list

在这里插入图片描述
再次安装,完美解决

问题4

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
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

如图
在这里插入图片描述
解决方案:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值