2014-09-04 31 views
1

我试图用自制安装OpenNI2,但中途我就遇到了这个常见的问题“错误:SHA1不匹配”错误:SHA1不匹配,同时安装openni2

我试图从这个类似于像另一个问题解决

SHA1 error when using brew installs'sbrew update;但它已经更新

我也试图删除,因为它指示,列出的档案,但我遇到了同样的问题。

运行brew doctor似乎没有给出一个很好的解决方案提示。

Preq。

$ brew tap homebrew/science 

$ brew tap totakke/openni2 

行动

$ brew install openni2 

输出

==> Downloading https://github.com/occipital/OpenNI2/archive/2.2-beta2.tar.gz 
######################################################################## 100.0% 
==> Downloading https://github.com/occipital/OpenNI2/pull/18.patch 
######################################################################## 100.0% 
Error: SHA1 mismatch 
Expected: e0be30b6b9296939306155580df1ac7912d3f949 
Actual: 4beb04a31a64677618801f0e95141807592442ef 
Archive: /Library/Caches/Homebrew/openni2--patch-e0be30b6b9296939306155580df1ac7912d3f949.patch 
To retry an incomplete download, remove the file above. 

reference

回答

4

原因是patch file的散列不匹配。

OpenNI2公式目前由homebrew-science托管。 这是一个自制科学问题。

另一种解决方案是自己编辑公式。

$ brew edit openni2 

- sha1 "e0be30b6b9296939306155580df1ac7912d3f949" 
+ sha1 "4beb04a31a64677618801f0e95141807592442ef" 

感谢竹内!

+0

我在安装cloud foundry-cli时遇到了这个问题,它在修改阀门后工作... – malajisi 2015-04-22 15:22:30

0

这意味着,由于第补丁已经改变e公式被写了。你应该确保补丁没有被恶意更改。如果您信任该修补程序,则可以运行brew edit openni2来编辑公式,删除与修补程序对应的sha1行,保存公式,然后重试。