homebrew安装问题(Failed during: git fetch origin master:refs/remotes/origin/master --tags --force)

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

猜你喜欢

转载自blog.csdn.net/u013983033/article/details/83118843
今日推荐