簡體   English   中英

Node.js 不會安裝在 Windows 7 x64 上

[英]Node.js won't install on Windows 7 x64

我嘗試了以下所有方法都失敗了

  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.

我在使用 node-v6.10.3-x64.msi 和 node-v6.10.3-x86.msi 安裝程序的 Win-7 上遇到了同樣的問題。

解決方法:

下載壓縮版本; 解壓時,請注意導致錯誤的文件。 然后,使用資源管理器,深入到目標文件夾,創建一個空文件,然后將存檔文件的內容復制到新的空文件中。

我認為到達目的地的 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.

由於 Nodejs 對 windows 7 的支持結束了。我發現手動安裝更容易。 從github看到這個評論: https : //github.com/nodejs/node/issues/33000#issuecomment-644530517

對來自以下位置的二進制 zip 文件執行相同的步驟: here

我在 Windows 10 中出現完全相同的錯誤。

啟動我的 shell 后,確保我以管理員身份運行,它工作正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM