homebrew安裝問題(Failed during: git fetch origin master:refs/remotes/origin/master --tags --force)

哈皮吖發表於2018-10-17

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
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

可能是國內網路問題
參考 https://blog.csdn.net/qq_35624642/article/details/79682979

1、將brew的install檔案下載本地
終端輸入 cd
終端輸入 curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
在這裡插入圖片描述
2、修改install檔案的映象源
終端輸入 vim brew_install
將下面兩行進行修改
#BREW_REPO = “https://github.com/Homebrew/brew”.freeze
#CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core”.freeze
替換成下面兩句
BREW_REPO = “https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git”.freeze
CORE_TAP_REPO = “https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git”.freeze
#就是“BREW_REPO”和“CORE_TAP_REPO”這兩項,將其修改為清華的映象
在這裡插入圖片描述
3、安裝
ruby ~/brew_install

相關文章