【问题标题】:How to fix Homebrew error "fatal: early EOF"?如何修复 Homebrew 错误“致命:早期 EOF”?
【发布时间】:2020-03-02 19:22:38
【问题描述】:

我正在尝试在 MacOS Catalina 上安装 Homebrew。

在他们的官方网页上运行命令后,我收到以下错误。

==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` 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

【问题讨论】:

  • 你能手动克隆那个 repo 吗?
  • 我已经修好了。通过运行命令git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1 感谢您的帮助!!

标签: homebrew


【解决方案1】:

我在使用 Mac M1 Big Sur 时遇到了同样的问题。

comment above 帮了大忙。

第 1 步:

sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

第 2 步:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

然后它失败了。

第 3 步:

cd /opt/homebrew/library/taps/homebrew 

第 4 步:

sudo rmdir homebrew-core

第 5 步:

git clone https://github.com/Homebrew/homebrew-core /opt/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

我也在浏览器上登录了 Github,不确定这是否重要。

【讨论】:

  • 在我的场景 brew doctor 上不起作用,仍然显示相同的错误
猜你喜欢
  • 2014-02-12
  • 2017-05-26
  • 2011-01-31
  • 2016-04-10
  • 2015-03-25
  • 2013-09-04
  • 1970-01-01
  • 2020-02-16
  • 2012-05-22
相关资源
最近更新 更多