Homebrew 的Checksum mismatch错误

    Homebrew是Mac系统中一款比较著名的软件包管理工具,该工具可以方便用户安装、维护和卸载Mac系统下的各种软件。Homebrew的安装非常简单,但是由于偶尔的网络故障,很可能会导致Checksum mismatch错误。

    安装仅需一条命令,过程如下:

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

    如果上述安装过程没有顺利完成,则需要重新运行命令,重复运行命令时则可能会出现Checksum mismatch错误,如下所示:

==> You are using macOS 10.10.
==> We (and Apple) do not provide support for this old version.
This installation may not succeed.
After installation, you will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.

==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
HEAD is now at d4fc6d5 Merge pull request #6971 from issyl0/linux-bump-formula-handles-bottle-sha
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: warning: unknown argument for --enable: `frozen-string-literal'
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: warning: unknown argument for --disable: `did_you_mean'
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.mavericks.bottle.tar.gz
Already downloaded: /Users/hoho/Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
Error: Checksum mismatch.
Expected: ab81211a2052ccaa6d050741c433b728d0641523d8742eef23a5b450811e5104
  Actual: 8e587089de7b9329ba72360836ed7b21d63a1fa53e2473c9e183560614b02781
 Archive: /Users/hoho/Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to install vendor Ruby.
Failed during: /usr/local/bin/brew update --force
testdeMacBook-Pro:Desktop hoho$ cd /Users/hoho/Library/Caches/Homebrew
testdeMacBook-Pro:Homebrew hoho$ ls
portable-ruby-2.6.3.mavericks.bottle.tar.gz

    此时,你只需要按照要求,删掉出现错误的软件包就可以了。从上面的信息来看,/Users/hoho/Library/Caches/Homebrew/该目录下的portable-ruby-2.6.3.mavericks.bottle.tar.gz 的校验和出现了错误。只需进入该目录,删掉该软件包即可。

$ cd /Users/hoho/Library/Caches/Homebrew/
$ rm -rf portable-ruby-2.6.3.mavericks.bottle.tar.gz 
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值