您的位置:首页 > 大数据 > 人工智能

在线安装visual studio时failed signature validation的原因和解决办法

2017-05-10 17:53 441 查看
这两天给笔记本重装了系统。笔记本的系统是windows 8.1。在装visual studio的时候想换个2017试试,就使用在线的方式装了个2017 community。



感觉不错,所以准备把开发的虚拟机里面的2015也换成2017。开发虚拟机的系统是windows server 2012 R2。结果,发现同样的在线安装流程,在虚拟机里面就是安装不上去。



在线的方式不行,就尝试离线。按照微软官方文档下载了一个离线安装包,需要执行其中的vs_installer.opc来安装vs。在笔记本中,发现里面的vs_installer.opc文件类型可以正常识别,但是,在开发的虚拟机里无法识别,也无法打开。

在笔记本中查看该文件,是一个office相关的文件类型,所以,我在虚拟机中又安装了office,之后重启,发现opc文件类型还是无法识别。在网上又尝试找了个opc文件的某个component,安装后仍不可以。只好放弃了离线安装的这条路子,重新折腾在线安装。

大量搜索后,终于找到了一个帖子的回复和我的情况很符合。

Gary Hill在回复中提到,他先尝试使用离线的方式安装,未果。之后,就是他通过对自己最近的可疑操作的分析,找到了根本原因:

After a lot of messing around I resorted to monitoring the install with ProcMon and spotted something suspicious shortly before the signature validation error was logged. On this system the setting “System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing” was enabled and registry keys related to this were being checked before the failure.

I disabled that setting and everything ran through just fine. Hopefully sharing this might save someone else a few hours!

这和我遇到的情况一模一样!

因为之前开发的需要,我将那台虚拟机的FIPS开启了,这样导致不是FIPS认证的hash算法都不能正常使用了。根据结果来分析,vs在线安装验证签名的时候,用的应该是非FIPS认证的算法,所以出错。

在修改了HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled(0是disabled,1是enabled)之后,再次执行vs在线安装程序,一切正常。



这里也分享出来,希望有同样问题的人能少走弯路。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息