【homebrew】Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/

【homebrew】Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --origin=origin exited with 128.

先来看一下报错

~ » brew update
unable to access ‘https://github.com/Homebrew/brew/’: Failed to connect to github.com port 443: Operation timed out
Error: Fetching /usr/local/Homebrew failed!
==> Tapping homebrew/core
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core’
fatal: unable to access ‘https://github.com/Homebrew/homebrew-core/’: Failed to connect to github.com port 443: Operation timed out
Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --origin=origin exited with 128.
Error: Failure while executing; /usr/local/bin/brew tap homebrew/core exited with 1.

替换homebrew源

替换homebrew默认源

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

替换homebrew-core源

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git

如果还没有解决:

Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
Error: Failure while executing: git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core
Failed during: /usr/local/bin/brew update --force

1.首先进入下载了一半的brew目录

cd "$(brew --repo)"

2.进入准备下载homebrew-core的目录

cd Library/Taps/

在这里建立两层目录

mkdir homebrew
cd homebrew/
mkdir homebrew-core

3.进入目录

cd homebrew-core/

4.开始clone

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

下载完了。

~ » brew update
会显示Already up-to-date.
上一篇:【Homebrew】Homebrew常用操作


下一篇:Brew 安装 JD-GUI 反编译工具