我正在尝试安装nodejs和npm,但是失败了。这是我的终端:
sudo apt-get install nodejs npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Conflicts: npm
E: Unable to correct problems, you have held broken packages.
该怎么办?我有点迷路了:(
1
哪个Ubuntu版本?我在13.04,工作正常。
—
埃里克·卡瓦略
版本是12.04 LTS。
—
user809829 2013年
奥利的答案对我有用。相反,他说的对我而言是正确的,那就是我已经有了npm(通过从存储库中安装nodejs),不需要单独安装npm。我将其写为答案是因为我既不能投票支持他的答案(要求15名),也不能评论他的答案(要求50名!)。
—
Devesh 2014年