微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在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

原文地址:https://www.jb51.cc/ubuntu/353956.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐