在Ubuntu 12.10上安装Node.js

前端之家收集整理的这篇文章主要介绍了在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

猜你在找的Ubuntu相关文章