fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERRO...

安裝 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ì)大家有所幫助!

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容