Chocolatey安装失败

项目场景

最近学习Vue2.0需要用到Node.js,但没有成功安装node.js的依赖,担心以后还会遇到其他问题,遂广泛查找资料,最终得以解决问题。

问题描述

在Node.js安装安装依赖工具时,遇到如下报错

WARNING: 'choco' was found at 'C:\ProgramData\chocolatey\bin\choco.exe'.
WARNING: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
Chocolatey v0.12.1
Upgrading the following packages:
python;visualstudio2019-workload-vctools
By upgrading, you accept licenses for the packages.
python is not installed. Installing...
python not installed. An error occurred during installation:
 Unable to connect to the remote server
python package files upgrade failed with exit code 1. Performing other installation steps.
The upgrade of python was NOT successful.
python not installed. An error occurred during installation:
 Unable to connect to the remote server



visualstudio2019-workload-vctools is not installed. Installing...
visualstudio2019-workload-vctools not installed. An error occurred during installation:
 Unable to connect to the remote server
visualstudio2019-workload-vctools package files upgrade failed with exit code 1. Performing other installation steps.
The upgrade of visualstudio2019-workload-vctools was NOT successful.
visualstudio2019-workload-vctools not installed. An error occurred during installation:
 Unable to connect to the remote server

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



Failures
 - python (exited 1) - python not installed. An error occurred during installation:
 Unable to connect to the remote server
 - visualstudio2019-workload-vctools (exited 1) - visualstudio2019-workload-vctools not installed. An error occurred during installation:
 Unable to connect to the remote server

原因分析

三个软件安装失败,分别是Chocolatey, visualstudio2019-workload-vctools, python。

解决方案

第一步:

首先去Wikipedia,明白chocolatey是什么,然后尝试寻找官方安装文档,果不其然找到了。

以下引用Wikipedia对chocolatey的描述:

Chocolatey是一个Windows下的软件包管理器,让用户可以像在类Unix系统中使用Yum和APT一样使用它,在Windows中实现自动化轻松管理Windows软件的所有方面(安装,配置,升级和卸载)。

第二步:

安装chocolatey以下为官方文档的安装指导步骤

官方文档的描述

第三步

使用chocolatey安装visualstudio2019-workload-vctools
官网安装步骤如下:
visualstudio2019-workload-vctools安装文档
第四步

安装完成之后,重新点击node.js安装包,重新选择安装额外的工具,选项如下:

node.js安装依赖重选

最终安装效果

最终安装效果

参考与引用

chocolatey安装文档

visualstudio2019-workload-vctools安装文档

chocolatey介绍

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值