我尝试了以下所有失败的方法
这是日志中显示的choclatey输出
Downloading nodejs.install 64 bit
from 'https://nodejs.org/dist/v5.10.1/node-v5.10.1-x64.msi'
Installing nodejs.install...
[ERROR] Running msiexec with /i "C:\Users\user1\AppData\Local\Temp\chocolatey\nodejs.install\5.10.1\nodejs.installInstall.msi" /quiet was not successful. Exit code was '1603' Error Mess
age:
.
At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1:92 char:10
+ throw <<<< $errorMessage
+ CategoryInfo : OperationStopped: ([ERROR] Running...or Message:
.:String) [], RuntimeException
+ FullyQualifiedErrorId : [ERROR] Running msiexec with /i "C:\Users\tcastonzo\AppData\Local\Temp\chocolatey\nodejs.install\5.10.1\nodejs.installInstall.msi" /quiet was not successful.
Exit code was '1603' Error Message:
.
The install of nodejs.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\nodejs.install\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/1 package(s). 1 package(s) failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
- nodejs.install
PS C:\GitProjects\reporting> choco install nodejs.install
Installing the following packages:
nodejs.install
By installing you accept licenses for the packages.
答案 0 :(得分:0)
我在使用node-v6.10.3-x64.msi和node-v6.10.3-x86.msi安装程序的Win-7时遇到了同样的问题。
<强>解决方案:强>
下载Zipped版本;提取时,请记下导致错误的文件。 然后,使用资源管理器,向下钻取到目标文件夹,创建一个空文件,然后将存档文件的内容复制到新的空文件中。
我认为前往目的地的FQ路径太长了。以下是我收到的错误消息。
! C:\Users\......\Downloads\node-v6.10.3-win-x64.zip: Cannot create node-v6.10.3-win-x64\node_modules\npm\node_modules\npm-registry-client\node_modules\npmlog\node_modules\gauge\node_modules\string-width\node_modules\is-fullwidth-code-point\node_modules\number-is-nan\package.json
! The system cannot find the path specified.
答案 1 :(得分:0)
由于Nodejs对Windows 7的支持终止了,我发现手动安装更加容易。 请参阅来自github的评论:https://github.com/nodejs/node/issues/33000#issuecomment-644530517
对来自here
的二进制zip文件执行相同的步骤答案 2 :(得分:-1)
我在Windows 10中出现完全相同的错误。
启动我的shell之后,确保我以管理员身份运行,它确实有效。