目录

Choco安装Vctools报错

报错

Windows安装Vue时说vctools没有安装成功,本机装的2019VS,为了使用SAS,node版本用的比较低,所以要再装一个2017的vctools,于是执行choco install visualstudio2017-workload-vctools报错

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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.

解决

法1

1
choco upgrade -y visualstudio2019-workload-vctools

法2

我的解决办法

使用管理员权限打开CMD或者PowerShell,执行命令

1
choco install visualstudio2017-workload-vctools