macos使用brew报错解决办法

brew install wget

==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles-portable-ruby/portable-ruby-3.3.8.arm64_big_sur.bottle.tar.gz

Already downloaded: /Users/song/Library/Caches/Homebrew/portable-ruby-3.3.8.arm64_big_sur.bottle.tar.gz

Error: Checksum mismatch.

Expected: 7645e2d653a335798030f6502e7834dfdbeeec5629429a1a34da5dbb2c57d63e

Actual: f568e9c295c94cad3a65bdb7c106fd6b97689b2aae0bb34a2619e5b7d08e59f2

Archive: /Users/song/Library/Caches/Homebrew/portable-ruby-3.3.8.arm64_big_sur.bottle.tar.gz

To retry an incomplete download, remove the file above.

Error: Failed to upgrade Homebrew Portable Ruby!

这个报错是 Homebrew 在安装依赖(portable-ruby)时校验和不一致 导致的,常见于镜像源下载的文件损坏或者缓存文件过期。解决办法很简单:


✅ 解决步骤

  1. 删除损坏的缓存文件

    rm -f /Users/song/Library/Caches/Homebrew/portable-ruby-3.3.8.arm64_big_sur.bottle.tar.gz

  2. 更新 Homebrew

    brew update --force --quiet
    brew upgrade

  3. 重新安装 wget

    brew install wget


🔄 如果你一直遇到校验错误(因为用的是 USTC 镜像)

可以先切换回官方源再试:

复制代码
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
brew update

然后再执行:

复制代码
brew install wget

就可以成功了:

相关推荐
@大迁世界1 小时前
液态玻璃屏正在侵蚀你的电池
macos·ios·objective-c·cocoa
liangshanbo12151 小时前
[特殊字符] macOS 上的 zoxide:智能目录跳转终极指南
macos·策略模式
pop_xiaoli2 小时前
【iOS】类与对象底层
macos·ios·objective-c·cocoa·xcode
一招定胜负4 小时前
视频转写+LLM分析:课堂录音自动化处理实现
macos·ios·xcode
坚果派·白晓明4 小时前
在 macOS 中搭建鸿蒙 PC 三方库交叉编译开发环境
macos·华为·harmonyos
blackorbird4 小时前
通过攻陷合法网站传播的新型iOS漏洞利用工具包DarkSword
macos·ios·objective-c·cocoa
ricky_fan19 小时前
(OpenAI)Codex 安装、部署使用方式
python·macos·conda·vim
音源部落1 天前
Cubase15 R2R/VR一键安装完整版本下载安装Nuendo 14最新版本下载安装支持Win/Mac 双系统版本加104G原厂音源Mac系统不关SIP安装编曲软件Cubase 15.0.10下载
macos·vr·cubase·cubase15·nuendo·nuendo14
代码AI弗森1 天前
Mac 长时间处在高温运行会怎么样?
macos
心愿许得无限大1 天前
macOS下打开麦克风崩溃
macos