HomeBrew安装踩坑

1.执行官方安装命令(https://brew.sh/

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

原因:访问问题

解决:

(1)手动下载brew_install.rb

        下载地址:https://download.csdn.net/download/u011439689/12982734

(2)执行命令安装

ruby /Users/你的用户名/存放路径/brew_install.rb

结果:

bogon:~ ddd$ ruby /Users/ddd/Downloads/brew_install.rb
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/share/man/man3
/usr/local/share/man/man5

。。。。。(省略若干行)

Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
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

2.处理更新问题

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly

方法:

(1)使用git命令增大缓存(单位是b,524288000B也就500M左右)

git config --global http.postBuffer 524288000

(2)执行brew update

bogon:~ ddd$ brew update
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 209, done.
remote: Counting objects: 100% (209/209), done.
remote: Compressing objects: 100% (121/121), done.
Receiving objects:  35% (289988/807898), 83.63 MiB | 45.00 KiB/s

。。。(省略若干行)

Tapped 2 commands and 5302 formulae (5,583 files, 356.4MB).
Already up-to-date.

完成

bogon:~ ddd$ brew -v
Homebrew 2.5.6
Homebrew/homebrew-core (git revision f2003f; last commit 2020-10-20)

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值