mac安裝hombrew報錯error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
問題描述
在 Mac 終端輸入了 Homebrew 官網(wǎng)給的安裝指令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
結(jié)果安裝到最后出現(xiàn)了錯誤:
fatal: unable to access 'https://github.com/Homebrew/brew/': Could not resolve host: github.com
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
都說是網(wǎng)不通,可是我也掛著 ss,應(yīng)該不是這個問題,很多解決方法是修改成鏡像的鏈接,不過貌似都不見效。試著在終端 ping 了一下 GitHub 的地址:
ping github.com?
結(jié)果網(wǎng)不通。
解決方案
修改 host 配置,在終端中輸入下列指令,打開編輯文件。
sudo vi /etc/hosts
按 s鍵 進入編輯模式,在最下面添加 13.229.188.59 github.com
再次嘗試在終端 ping github.com,發(fā)現(xiàn)已經(jīng)成功了。
常見問題
在安裝過程中,出現(xiàn)如下錯誤,也是網(wǎng)不通
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly