在Ubuntu 12.10上安装Node.js

我试图在我的ubuntu 12.10安装Node.js,但终端显示我有关丢失包的错误,我试图这样:
sudo apt-get install python-software-properties 
sudo add-apt-repository ppa:chris-lea/node.js 
sudo apt-get update 
sudo apt-get install nodejs npm

但是当我来到最后一行sudo apt-get install nodejs npm显示一个错误:

Failed to install some packages. This may mean that
You requested an impossible situation or if you are using the distribution
distribution that some required packages have not yet been created or been
been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs: Conflicts: npm
E: Failed to correct problems,you have held broken packages.

然后我卸载了ppa:chris-lea / node.js,我试图第二个选项:

sudo apt-get install node.js
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm

同样的错误,终端说npm是在最后的版本,但也显示我的文本显示在顶部。我认为问题是ppa:chris-lea / node.js但我不知道如何解决它。

只需按照给出的说明 here

Example install:

06000

It installs current stable Node on the current stable Ubuntu. Quantal
(12.10) users may need to install the software-properties-common
package for the add-apt-repository command to work: sudo apt-get
install software-properties-common

As of Node.js v0.10.0,the nodejs package from Chris Lea’s repo
includes both npm and nodejs-dev.

不要给sudo apt-get安装nodejs npm只是sudo apt-get安装nodejs

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...