错误示例
//brew 在安装包时出现 ‘Error: Checksum mismatch’ 这种错误
//通过执行 rm 命令,可以解决
TH-2:~ dev1$ brew install glf
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86
Already downloaded: /Users/dev1/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
Error: Checksum mismatch.
Expected: b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86
Actual: 41ac88f5ff960bd892ec9795a96bc93e57c5ad0fb78c5537ba2415ddc3c240f3
Archive: /Users/dev1/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!
解决办法
rm /Users/dev1/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
brew doctor