MAC 环境 前端开发环境

unable to access 'https://github

2021-10-26  本文已影响0人  徐小丘

安装 Homebrew 执行完安装语句

/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

解决办法

首先,更换有效的镜像地址;

git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

如果提示已经存在直接到下一步

其次,前往至 homebrew-core 将其当前的镜像地址也更为有效的地址;

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

再其次,将如上配置文件内容更替后,重新执行更新;

brew update

最后,执行完如上操作后,终端显示如下字样内容即可。

Already up-to-date.

以上便是此次分享的全部内容,希望能对大家有所帮助!`

上一篇 下一篇

猜你喜欢

热点阅读