【问题标题】:Failed to install last NodeJs version on Debian 9无法在 Debian 9 上安装最新的 NodeJs 版本
【发布时间】:2018-03-04 12:03:10
【问题描述】:

我尝试按照NodeJs website 上的步骤在我的 Debian 9 上安装 NodeJS

当我这样做时:

sudo curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

我收到一个我认为与 Node 无关的错误:

E:获取http://dl.google.com/linux/chrome/deb/dists/stable/InRelease失败

(我不知道这是否会影响 Node 的安装)

之后我做了:

sudo apt-get install -y nodejs

程序完成安装,但它安装的是 v4.8.2 而不是最新版本。

当我这样做时:

nodejs -v

我明白了:

v4.8.2

我尝试将这两行添加到我的 nodesource.list 文件中:

deb https://deb.nodesource.com/node_9.x stretch main 
deb-src https://deb.nodesource.com/node_9.x stretch main

然后apt-get update 但这并没有解决问题。

我该怎么办?

编辑:当我执行apt update 时,我也收到了一个错误(也许我之前没有注意到),我认为这是问题的原因。 这个错误是

Err:1 http://ftp.debian.org/debian 稳定的 InRelease

我为此here 找到了解决方案。我修复了这个问题,之后我成功安装了最新版本的 NodeJS。

【问题讨论】:

    标签: node.js linux debian


    【解决方案1】:

    在尝试了不同的事情之后,我发现我在执行apt update 时遇到了错误 错误是:Err:1 http://ftp.debian.org/debian stable InRelease。 所以这是真正的问题。 我在github 中找到了解决此错误的方法 (这是一个互联网配置问题)。 我解决了这个问题,之后我成功安装了最新版本的 Node.Js。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-16
      • 2022-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-01
      • 2018-06-03
      相关资源
      最近更新 更多