安裝 Homebrew 執(zhí)行完安裝語(yǔ)句
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
拋出如下異常
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` 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
解決辦法
survivors@sdeMacBook-Pro ~ % git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 5105, done.
remote: Compressing objects: 100% (4904/4904), done.
remote: Total 5105 (delta 44), reused 886 (delta 5)
Receiving objects: 100% (5105/5105), 4.14 MiB | 1.17 MiB/s, done.
Resolving deltas: 100% (44/44), done.
survivors@sdeMacBook-Pro ~ % cd "$(brew --repo)"
survivors@sdeMacBook-Pro Homebrew % git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
survivors@sdeMacBook-Pro Homebrew % cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
survivors@sdeMacBook-Pro homebrew-core % git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
survivors@sdeMacBook-Pro homebrew-core % brew update
Already up-to-date.
如上終端中 code 所示,執(zhí)行如下語(yǔ)句
首先,更換有效的鏡像地址;
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
其次,前往至 homebrew-core 將其當(dāng)前的鏡像地址也更為有效的地址;
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
再其次,將如上配置文件內(nèi)容更替后,重新執(zhí)行更新;
brew update
最后,執(zhí)行完如上操作后,終端顯示如下字樣內(nèi)容即可。
Already up-to-date.

異常全過(guò)程處理
以上便是此次分享的全部?jī)?nèi)容,希望能對(duì)大家有所幫助!