Homebrew in OS X 10.9.2: Error: SHA256 mismatch

2019-03-30 06:25发布

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

4条回答
小情绪 Triste *
2楼-- · 2019-03-30 06:48

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."

查看更多
来,给爷笑一个
3楼-- · 2019-03-30 06:56

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).

查看更多
唯我独甜
4楼-- · 2019-03-30 07:07

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

查看更多
【Aperson】
5楼-- · 2019-03-30 07:10

I got fix, using steps wrote by MoOx:

cd /Library/Caches/Homebrew/downloads/

and delete manually the package and run againbrew upgrade works fine!

查看更多
登录 后发表回答