Node.js在Windows 7 x64上无法安装。

3

我尝试了以下几种方法,但都失败了:

  1. 通过 Node 网站的 GUI 运行 .msi 安装程序(没有以管理员身份运行的选项)
  2. 通过命令行以管理员身份运行 .msi 安装程序
  3. 以管理员身份运行 choclatey 安装程序

以下是日志中看到的 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.
3个回答

1
我曾经在安装node-v6.10.3-x64.msi和node-v6.10.3-x86.msi时遇到了相同的问题。
解决方法:下载压缩版本;解压时注意引起错误的文件。然后,使用资源管理器进入目标文件夹,创建一个空文件,将存档文件的内容复制到新的空文件中。
我认为目标路径的完全限定路径太长了。下面是我收到的错误消息。
!   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.

感谢您格式化消息,@BSMP。非常感谢。 - Starunit

1

-1

我在Windows 10中遇到了完全相同的错误。

启动我的shell后,确保我以管理员身份运行,它就可以工作了。


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