Homebrew 便携式 Ruby 错误 macOS 10.14.6

问题描述 投票:0回答:4

Homebrew 突然停止工作,当我运行任何 brew 命令时,我会得到以下输出:

==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
Already downloaded: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
/usr/local/Homebrew/Library/Homebrew/cmd/vendor-install.sh: line 123: /usr/bin/cut: cannot execute binary file
Error: Checksum mismatch.
Expected: b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86
  Actual: 
 Archive: /Users/<user>/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to upgrade Homebrew Portable Ruby!

我已经尝试删除文件 portable-ruby-2.6.3_2.yosemite.bottle.tar.gz 但它不起作用,而且我在 Google 上找不到有关此错误的任何有用信息。

如有任何帮助,我们将不胜感激。

ruby macos homebrew
4个回答
1
投票

针对您的情况,我可以想到几件事。

  • 您的输出具有 yosemite 标识符,需要明确的是,MacOS Yosemite 实际上是

    10.10.x
    ,它不在当前/最新的自制程序支持列表中,并且也与问题标题中的 10.14 Mojave 不同。因此,如果您实际上正在使用 Mojave,您可以使您的 brew 保持最新并重新安装 ruby。

  • 最新的Ruby公式实际上是

    2.7.x
    ,你可能想重新安装/升级(
    brew reinstall ruby
    /
    brew upgrade ruby
    )。

总而言之,如果您仍然遇到问题,请附上

brew config
brew doctor
的输出以进行故障排除。


0
投票

尝试

brew update-reset
,然后尝试
brew upgrade


0
投票

它已设置为portable-ruby-2.6.3_2.yosemite.bottle.tar.gz 已经下载,所以我将其删除,从此以后就可以了。


0
投票

我在每个brew命令上都有同样的问题,我收到以下错误

brew reinstall ruby
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:d783cbeb6e6ef0d71c0b442317b54554370decd6fac66bf2d4938c07a63f67be
Already downloaded: /Users/fazalsandhi/Library/Caches/Homebrew/portable-ruby-3.1.4.arm64_big_sur.bottle.tar.gz
Error: Checksum mismatch.
Expected: d783cbeb6e6ef0d71c0b442317b54554370decd6fac66bf2d4938c07a63f67be
  Actual: 3c12639f83bc7d9e92f5dc6c2f82feb88ded087462d20c3fbbc5a3e72bbf0b3c
 Archive: /Users/fazalsandhi/Library/Caches/Homebrew/portable-ruby-3.1.4.arm64_big_sur.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!


brew upgrade
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:d783cbeb6e6ef0d71c0b442317b54554370decd6fac66bf2d4938c07a63f67be
######################                                                     31.2%curl: (18) transfer closed with 8971490 bytes remaining to read

Error: Checksum mismatch.
Expected: d783cbeb6e6ef0d71c0b442317b54554370decd6fac66bf2d4938c07a63f67be
  Actual: bbf8232cf38ff2f566ec8cca3bec0f4d1c8a87dfe21b41aa6f4ad2d32e3f846d
 Archive: /Users/fazalsandhi/Library/Caches/Homebrew/portable-ruby-3.1.4.arm64_big_sur.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!

我运行了以下命令来删除该 ruby 文件,但仍然在每个 brew 命令上下载

rm /Users/fazalsandhi/Library/Caches/Homebrew/portable-ruby-3.1.4.arm64_big_sur.bottle.tar.gz
© www.soinside.com 2019 - 2024. All rights reserved.