fix brew upgrade problem

1,950 阅读2分钟

ChecksumMismatchError: SHA256 mismatch

==> Downloading ftp.gnu.org/gnu/automak… Already downloaded: /Users/zoushijun/Library/Caches/Homebrew/downloads/4d1b7ba97c39fced113b7993996a12d0a5d3c4f6f32a9f80232c4d1376a49ce5--automake-1.16.1.tar.xz ==> Downloading git.savannah.gnu.org/cgit/automa… -=O=-# # # # Error: An exception occurred within a child process: ChecksumMismatchError: SHA256 mismatch Expected: 7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce Actual: c048ce853eef073a5dfce34fcf9af786e8525e384e01dbbf4e6066623985d4c7 Archive: /Users/zoushijun/Library/Caches/Homebrew/downloads/d1a7da67f605d4ecad31b6a1084d23e41059c58dbc9929a139cb461f36540c3d--596e9e130f38ae068ac6150b2d62eafd544900f6..a348d830659fffd2cfc42994524783b07e69b4b5.patch To retry an incomplete download, remove the file above.

解决办法: 手动安装

  • cd /Library/Caches/Homebrew/downloads
  • tar xzf 4d1b7ba97c39fced113b7993996a12d0a5d3c4f6f32a9f80232c4d1376a49ce5--automake-1.16.1.tar.xz
  • cd automake-1.16.1
  • ./configure --prefix=/usr/local
  • make
  • sudo make install

brew not found automake

解决办法: 通过brew install automake,但是还是会出现 Error: An exception occurred within a child process: ChecksumMismatchError: SHA256 mismatch Expected: 7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce Actual: c048ce853eef073a5dfce34fcf9af786e8525e384e01dbbf4e6066623985d4c7 Archive: /Users/zoushijun/Library/Caches/Homebrew/downloads/d1a7da67f605d4ecad31b6a1084d23e41059c58dbc9929a139cb461f36540c3d--596e9e130f38ae068ac6150b2d62eafd544900f6..a348d830659fffd2cfc42994524783b07e69b4b5.patch To retry an incomplete download, remove the file above 这里可以去修改brew 安装文件的rd,把sha256 给改了。 修改这个文件,把里边的sha256给修改成actual sha256,就可以安装了
文件位置
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/automake.rb