"choco install visualstudio2017-workload-vctools" 安装失败 错误: visualstudio2017-workload-vctools的安装未成功。

8
C:\WINDOWS\system32>choco install visualstudio2017-workload-vctools
Chocolatey v0.10.15
Installing the following packages:
visualstudio2017-workload-vctools
By installing you accept licenses for the packages.
Progress: Downloading visualstudio2017-workload-vctools 1.3.2... 100%

visualstudio2017-workload-vctools v1.3.2 [Approved]
visualstudio2017-workload-vctools package files install completed. Performing other installation steps.
The package visualstudio2017-workload-vctools wants to run 'ChocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): a

ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.
The install of visualstudio2017-workload-vctools was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2017-workload-vctools\tools\ChocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - visualstudio2017-workload-vctools (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2017-workload-vctools\tools\ChocolateyInstall.ps1'.
 See log for details.

我尝试安装node.js,但出现了以下错误。 - RakeshP-0304
4个回答

9
使用 choco upgrade -y visualstudio2019-workload-vctools 命令进行升级。

1
以管理员身份运行CMD - Shubham Shekhaliya

6

看起来你的Visual Studio 安装程序已经过期了。

尝试升级安装程序

"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"

然后(以管理员身份运行)

choco upgrade -y visualstudio2017-workload-vctools


我收到了这个错误:无法检测到任何受支持的Visual Studio产品。您可以尝试传递--installPath或--productId和--channelId参数。 visualstudio2017-workload-vctools的升级不成功。 运行'C:\ProgramData\chocolatey\lib\visualstudio2017-workload-vctools\tools\ChocolateyInstall.ps1'时出错。 请查看日志以获取详细信息。 - RakeshP-0304
1
在执行中间步骤时,我重启了计算机以清除闲置的安装实例。这样做消除了我运行“choco upgrade -y visualstudio2017-workload-vctools”命令时遇到的错误。非常感谢! - JattCode113

4

尝试以“管理员身份运行”CMD或PowerShell,并运行choco upgrade -y visualstudio2019-workload-vctools

这解决了我的问题。


2

如其他人建议的那样,运行以下命令可以解决问题...至少对我有效:choco upgrade -y visualstudio2019-workload-vctools

我要补充一点,可能需要在执行该命令时关闭并重新打开PowerShell。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接