Mac install homebrew and error process

This is the first homebrew official website

https://brew.sh/index_zh-cn

The method of installation is in a terminal

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

Note that the default values ​​ahead of the best increase in the curl of a terminal postBuffer

Otherwise, you may report the following error message

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

When this solution

In a terminal

git config - , Ltd. Free Join http.postBuffer 1.048576 billion # where the number is the number of bytes 
# here is to 1000MB is 1000 * 1024 * 1024 
# to change according to their needs value 

# modified after postBuffer can be viewed with the following command 
git config --list

 

The following error may also occur that is not enough to prompt speed request is stopped

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

It can be solved by the following methods:

Method One: Replace download the source to domestic sources of Tsinghua University

step1: Replace the warehouse source

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

brew update

step2: Replace the Homebrew-bottles mirror (affecting software download speed)

  Temporary modification

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles

  Permanent modification

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

 

Reference website

https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

Guess you like

Origin www.cnblogs.com/PowerTips/p/11220931.html