【发布时间】:2019-02-05 18:33:14
【问题描述】:
我正在尝试安装 NPM。为此,我跑了:
sudo apt-get install nodejs
这很成功。然后我跑了:
sudo apt-get install npm
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:
npm : Depends: node-gyp (>= 0.10.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
尝试安装 node-gyp 会导致“未满足的依赖项”的无尽路径。
我遵循了这些说明并且有 0 个未升级的软件包; https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa
我禁用了所有其他软件源,但仍有问题。对于其他软件包(hhvm 和 mono),我一直遇到这个问题。我可以做些什么来解决这些问题?
【问题讨论】:
-
npm 如今随 nodejs 一起提供。你确定你还没有吗?
-
当我安装 nodejs v.4.0.0 时发生这种情况,但奇怪的是我像往常一样使用 npm :)
-
我尝试运行 NPM 并得到“当前未安装程序 'npm'。您可以通过键入:sudo apt-get install npm 来安装它”
标签: node.js ubuntu npm apt-get