无法纠正问题,您已经破坏了包裹


1

我有一个正在生产的Ubuntu 16.04服务器,我想安装nodenpm。所以我跑了这个:

sudo apt install nodejs nodejs-legacy npm

所述的NodeJS遗留包仅意在对要求节点二进制是/ usr / bin中/节点(如在Debian中提供不在/ USR /斌/的NodeJS)遗留Node.js的代码符号链接。我发现我需要它做nodenpmUbuntu上正常工作。

我在新的Ubuntu 16.04服务器上运行了多次apt install命令,但在这个生产服务器上我收到以下错误:

$ sudo apt install nodejs nodejs-legacy npm
[sudo] password for kramer65:
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: nodejs-legacy
          Conflicts: npm
E: Unable to correct problems, you have held broken packages.

由于这适用于新的Ubuntu服务器,我不知道为什么它不适用于这个。

我检查了我的sources.list,但只包含以下内容:

$ cat /etc/apt/sources.list
deb http://nl.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://nl.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://nl.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://nl.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse

有谁知道我怎么能找出这里有什么问题?


aptitude在这种情况下使用以找出错误,并选择有效的包组合。
dirkt 2017年

你找到了问题的解决方案吗?
kRazzy R

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.