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)

 

 

 

你可能感兴趣的:(【Web前端问题】,brew,homebrew,ruby,443,RPC,failed)