Mac installed homebrew and error processing

First of all, this is homebrew’s official website

https://brew.sh/index_zh-cn

Install The method is to type in the terminal

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

It should be noted that it is best to increase the default value of curl’s postBuffer in the terminal in advance

Otherwise, the following error message may be reported

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

The solution to this

Enter in the terminal

git config --global http.postBuffer 1048576000 #< span style="color: #008000;"> The number here is the number of bytes

#
Here is 1000MB which is 1000 * 1024 * 1024
#
You can change the value according to your needs

# After modification, you can check the postBuffer with the following command
git config --list

The following error may also appear, indicating that the internet speed is not enough and the request has been 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 1: Change the download source to the domestic Tsinghua source< /p>

step1: Change 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)< span style="color: #800000;">"/Library/Taps/homebrew/homebrew-cask
git remote set
-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

brew update

step2: Replace 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/

https://brew.sh/index_zh-cn

pre>

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

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

git config --global http .postBuffer 1048576000 # The number here is the number of bytes

#
Here is 1000MB which is 1000 * 1024 * 1024
#
You can change the value according to your needs

# After modification, you can check the postBuffer with the following command
git config --list

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

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)< span style="color: #800000;">"/Library/Taps/homebrew/homebrew-cask
git remote set
-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

brew update

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

p>

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

source
~/.bash_profile

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

< /p>

Leave a Comment

Your email address will not be published.