Reputation: 2031
brew install php55
==> Downloading http://www.php.net/get/php-5.5.11.tar.bz2/from/this/mirror
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: 60e14c255f2a461a7a26639b84a2fc448cc2f91c8dead0e9fd00cd8ba27a2e96
Actual: 0d9438c2557db5809f4232148ca1567516e7ece9bf8726853ceac4a111cb8690
Archive: /Library/Caches/Homebrew/php55-5.5.11
To retry an incomplete download, remove the file above.
I tried
brew cleanup && brew update
but not worked
Upvotes: 17
Views: 39484
Reputation: 77
Also ran into this just recently, turned out my proxy settings had been removed somehow, so double checking could be helpful.
Upvotes: -2
Reputation: 6442
This can happen if a corporate security policy intercepts the request to the cask and responds with an Access Blocked page instead. You can tell by seeing the file's URL rewritten and its content being HTML. In that case you have to ask them to relax the policy or you're out of luck.
Upvotes: 0
Reputation: 59
Error: libvirt: SHA256 mismatch
Expected: ac06a7b7a74cf83e953f50e33455df97fc87880ebdac4f1dca89a62331375b1a
Actual: 3346ebf9df9fc4dd37b4c0a5bf1ce80a577b97a7a48dac3febf22aa857be9a98
File: /Users/mek/Library/Caches/Homebrew/downloads/6287efc2ec4d5147e8389b97caeb20dd0d4acec390b5910b2454a4dd018654c1--libiscsi--1.19.0.big_sur.bottle.tar.gz
To retry an incomplete download, remove the file above.
To resolve above error run below commands:
Upvotes: 5
Reputation: 1121
I also tried brew cleanup and brew update but still got the same issue so i did this
brew edit <application>
and replaced sha256 value with actual value shown in error msg.
and this worked out for me, hope it helps you too.
Upvotes: 20
Reputation: 358
I had the same problem with watchman.
brew install watchman
response for :
==> Installing dependencies for watchman: automake, pcre
==> Installing watchman dependency: automake
==> Downloading https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz Already downloaded:
/Users/piccolo/Library/Caches/Homebrew/automake-1.16.1.tar.xz
==> Downloading https://git.savannah.gnu.org/cgit/automake.git/patch/?id=a348d83 Already downloaded:
/Users/piccolo/Library/Caches/Homebrew/automake--patch-7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce.git
Error: SHA256 mismatch Expected:
7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce
Actual:
c048ce853eef073a5dfce34fcf9af786e8525e384e01dbbf4e6066623985d4c7
Archive:
/Users/piccolo/Library/Caches/Homebrew/automake--patch-7a57ca2b91f7f3c0b168cf5ffbc8a1b2168f3886bcadcc15412281472dace3ce.git
To retry an incomplete download, remove the file above.
then I did this:
brew uninstall automake
brew cleanup
brew update
brew install watchman
Then it worked.
Upvotes: 2
Reputation: 123
I got fix, using steps wrote by MoOx:
cd /Library/Caches/Homebrew/downloads/
and delete manually the package and run againbrew upgrade
works fine!
Upvotes: 1
Reputation: 8991
Sometimes, you may have a package that have a new SHA (eg: github updated the way it compress tar.gz), so best thing to do is to fix the original formula (you can try locally and also push your change upstream).
Upvotes: 0
Reputation: 369
I had the same problem with MongoDb. I was able to fix it first I changed the permission to admin.
Then I ran
brew cleanup && brew update
After that I ran
brew install mongodb
and it worked like a charm
Upvotes: 23
Reputation: 2232
Some one face the same issue. https://github.com/Homebrew/homebrew-php/issues/875
"I checked the downloaded file, and it's the html download page rather than the tarball.
It looks like php now wants the URLs to be in the form of http://www.php.net/get/php-5.4.22.tar.bz2/from/a/mirror instead of http://www.php.net/get/php-5.4.22.tar.bz2/from/this/mirror
EDIT: I'm totally mistaken with this. from/this/mirror is the correct one, but it's borked on php's side."
Upvotes: 1