文章目录
1. 错误显示
如图,反正是不断重复 进行下载验证 但是就是没有安装。
2022.2.11更新,似乎有很多人都遇到这个问题,之前写的不是很详细,为了防止某些同学可能连下面写的网页都打不开,今天补一下,把图都补上。写的更详细点!👻👻👻
2. 确定错误原因
感谢这个博主的解决记录:win10 无法安装VS2017,visual studio installer下载进度始终为0。
所以我也去查自己的log
日志了,
证书无效,
在浏览器中输入:https://aka.ms/vs/16/release/installer
可以直接下载 vs_install.opc
这个东西就是上图 第一个进度条显示的 正在下载/验证的那个东西。然而,双击打开的时候显示 没有默认打开程序,尴尬。。。
每个人的错误不一样,那个博主的问题不适合于我,大家还是看了日志之后自己谷歌一哈,
- 首先验证是不是可以从这个网址
https://aka.ms/vs/16/release/installer.
下载到vc_install.opc
- 然后尝试删除
C:\ProgramData\Microsoft\VisualStudio\Packages\_bootstrapper\vs_installer\5.0vn\vs_installer.opc
, 并重新下载https://visualstudio.microsoft.com/downloads/
。 - 没用卵用
- 唯一有用的信息是,可以使用解压缩软件对
vc_install.opc
进行解压,得到类似:
Contents
文件夹中可以找到vs_install.exe
文件,运行,得到
vs_installershell.exe has an invalid certificate
反正就是证书无效呗。在package->service->digital-signature
文件夹中看到 数字签名,但是不知道怎么用,继续搜索 - MS官方问题-visual studio installer has invalid certificate
- MS官方文档回答-Install certificates required for Visual Studio offline installation
错误原因
证书无效
2. 解决3 成功✅
2.0 update win10解决方案(来自评论区)
如果问题是:
“6dbc:0021][2025-05-07T10:35:56] WebClient failed in '~; with '基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系。' - ' ~;.
[6dbc:0021][2025-05-07T10:35:56] Download failed using WebClient engine. System.Net.WebException: 基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系。 ---> System.Security.Authentication.AuthenticationException: 根据验证过程,远程证书无效。”
而直接访问 网页链接是可以下载到“vs_installer.opc”这个文件的话
可以尝试: 更新根证书
- 打开 PowerShell,以管理员身份运行以下命令:
> certutil -generateSSTFromWU roots.sst
> Import-Certificate -FilePath .\roots.sst -CertStoreLocation Cert:\LocalMachine\Root
(适用于 Windows 10 和更新版本)
参考:
- certutil命令的generateSSTFromWU参数
- Wix Toolset Visual Studio 2019 Extension fails to install with invalid certificate
#6053 - Get the latest CTL or list of trusted root certificates
- upport.microsoft的文章——An update is available that enables administrators to update trusted and disallowed CTLs in disconnected environments in Windows
有以下描述:New verbs in Certutil
SyncWithWUThis verb is used to synchronize a destination directory with the Windows Update site. The following is the syntax of the verb:CertUtil [Options] -syncWithWU DestinationDir
Note DestinationDir is the folder that the files are copied to. When you run the command, the following files are downloaded from Windows Update:
Authrootstl.cab: Contains the CTL of third-party root certificates.
Disallowedcertstl.cab: Contains the CTL of disallowed certificates
Disallowedcert.sst: Contains the Disallowed certificates.
Thumbprint.crt: Third-party root certificates.
For example, you can synchronize a destination directory with the Windows Update site by running the following command:CertUtil -syncWithWU \\computername\sharename\DestinationDir
GenerateSSTFromWUThis verb is used to generate .sst files from the Windows Update site. The following is the syntax of the verb:CertUtil [Options] -generateSSTFromWU SSTFile Note SSTFile is the name of the .sst file that is created. The generated .sst file contains the third-party root certificates that are downloaded from Windows Update.
For example, you can generate .sst files from the Windows Update site by running the following command:CertUtil –generateSSTFromWU Rootstore.sst
2.1 确认该如何解决
看到有个人的回答是(以前的截图):
不过网页改版了,现在显示是这样:
- 简单来说,就是 如果visual studio下载不受信任,就去下载 windows7 KB3004394,这个补丁就是用于信任证书的。
- 打开后是俄语 把 链接中的
ru-ru
改成zh-cn
就是中文了,或者直接点我下面那个已经改好的链接,然后去下载对应自己系统版本的KB3004394
(我是win7 64)
https://support.microsoft.com/zh-cn/help/3004394/support-for-urgent-trusted-root-updates-for-windows-root-certificate-p
打开后,页面显示如下:
也就是说:如果visual studio卡,下不了,大概率是因为不受信任,所以要安装这个信任证书
2.2 下载对应的补丁
方法1
win7的检查更新(已经停止支持更新了,因此可以尝试手动打开自动更新,我试了,没啥反应 因此还是自己下载吧)。
方法2
自己下载,就在这个页面:https://support.microsoft.com/zh-cn/topic/紧急的受信任的根更新-windows-windows-中的根证书程序的支持-a4ac4d6c-7c62-3b6e-dfd2-377982bf3ea5
往下翻,有个表格!
找对应自己的系统版本,下载。表格里的链接其实会转到一个页面,而不是直接进行下载任务,如下:
点击下载之后,就是这样:
找好对应版本!!!!
如果你打不开这个页面,没问题,我把补丁包下载链接转移过来了,如下表:
操作系统 |
---|
所有受支持的基于 x86 的 Windows 8.1 版本——补丁包 |
所有受支持的基于 x64 的 Windows 8.1 版本——补丁包 |
所有受支持的基于 x86 的 Windows 8 的版本——补丁包 |
所有受支持的基于 x64 的 Windows 8 的版本——补丁包 |
所有受支持的基于 x86 的 Windows 7 版本——补丁包,注意,这个文件的名称是Windows6.1-KB3004394-v2-x86 |
所有受支持的基于 x64 的 Windows 7 版本——补丁包,注意,这个文件的名称是Windows6.1-KB3004394-v2-x64 |
如果你网不行,点进去半天没有反应,下载不下来,没关系,我也下好了,传到csdn上了。去我主页的资源看。
我这里没有显示链接,是因为还没有审核通过,等等就好了
2.3 结果
下载完了,安装,然后重启visual studio的下载程序
然后,OK啦 (~ ̄▽ ̄)~ so easy(想起了 奥卡姆剃刀原理 简单有效)
如果这个解决方案对你有用,请给我点个赞👍👍👍
感谢各位看官大老爷❗❗❗
3. 其他尝试
以下为失败尝试
解决1 无效
参考:解决记录:win10 无法安装VS2017,visual studio installer下载进度始终为0
-
检查服务是否全都启动(右击
我的电脑
->管理
->服务
找到以下服务 查看是否 处于启动状态)
Background Intelligent Transfer Service-----》这个就是BITS服务
COM+ Event System
Network Connections
Remote Procedure Call (RPC)
System Event Notification Services
确认是全部启动的 -
检查系统组件是否完善
- Windows+x,打开“命令提示符(管理员),执行以下命令:
DISM/Online /Cleanup-image /Scanhealth DISM/Online /Cleanup-image /Restorehealth Sfc /scannow
然后涨知识了,dism RestoreHealth 和 CheckHealth选项时提示错误:87,DISM命令检查和修复系统映像文件。
我是win7 放弃
-
检查网络
netsh winsock reset netsh int ip reset ipconfig /release ipconfig /renew ipconfig /flushdns
-
重启试试 无效 log文件中依然是 无效的证书