【问题标题】:How to install nodejs 4.* on Ubuntu 14.04如何在 Ubuntu 14.04 上安装 nodejs 4.*
【发布时间】:2016-10-22 23:56:56
【问题描述】:

我一直在查看一些解释如何在 Ubuntu 14.04 上安装 nodejs 4.* 的页面,但它没有安装并告诉我我已经拥有最新版本:

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

## Installing the NodeSource Node.js v4.x LTS Argon repo...


## Populating apt-get cache...

+ apt-get update
Ign http://archive.canonical.com precise InRelease
Ign http://extras.ubuntu.com trusty 
.
.
.        
Ign http://jp.archive.ubuntu.com trusty/restricted Translation-en_US           
Ign http://jp.archive.ubuntu.com trusty/universe Translation-en_US             
W: Failed to fetch http://dl.google.com/linux/webdesigner/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting

$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 173 not upgraded.

$ node --version
v0.10.25

curl 命令末尾有一个错误,但我不知道这是否相关。我正在关注本指南 - https://nodejs.org/en/download/package-manager/ - 但其他页面似乎相同。怎么了?

【问题讨论】:

标签: node.js ubuntu


【解决方案1】:

嘿,最简单的解决方案是使用 nvm(节点版本管理器),通过使用 nvm,您可以使用简单的命令轻松切换到任何版本的节点,点击下面的链接安装 nvm。 https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps

【讨论】:

    猜你喜欢
    • 2014-12-23
    • 2015-09-05
    • 2017-09-27
    • 2015-12-19
    • 2015-05-26
    • 1970-01-01
    • 1970-01-01
    • 2016-04-03
    • 2014-07-24
    相关资源
    最近更新 更多