sudo apt install npm 它不起作用“以下软件包具有未满足的依赖项”

Posted

技术标签:

【中文标题】sudo apt install npm 它不起作用“以下软件包具有未满足的依赖项”【英文标题】:sudo apt install npm it is not working "The following packages have unmet dependencies" 【发布时间】:2020-08-23 09:44:19 【问题描述】:

构建依赖树 读取状态信息...完成 某些软件包无法安装。这可能意味着您有 请求不可能的情况,或者如果您使用的是不稳定的 一些必需的包尚未创建的分发 或被移出 Incoming。 以下信息可能有助于解决这种情况:

以下包具有未满足的依赖关系: npm : 取决于:nodejs (>= 6.11~)

   Depends: node-ansistyles (>= 0.1.3~) but it is not going to be installed
   Depends: node-aproba (>= 1.2~) but it is not going to be installed
   Depends: node-archy (>= 1.0~) but it is not going to be installed
   Depends: node-cacache (>= 10.0.4~) but it is not going to be installed
   Depends: node-bluebird (>= 3.5.1~) but it is not going to be installed
   Depends: node-call-limit (>= 1.1~) but it is not going to be installed
   Depends: node-chownr (>= 1.0.1~) but it is not going to be installed
   Depends: node-config-chain (>= 1.1.11~) but it is not going to be installed
   Depends: node-detect-indent (>= 5.0~) but it is not going to be installed
   Depends: node-detect-newline (>= 2.1~) but it is not going to be installed
   Depends: node-editor (>= 1.0~) but it is not going to be installed
   Depends: node-fs-vacuum (>= 1.2.10~) but it is not going to be installed
   Depends: node-fs-write-stream-atomic (>= 1.0.10~) but it is not going to be installed
   Depends: node-glob (>= 7.1.2~) but it is not going to be installed
   Depends: node-graceful-fs (>= 4.1.11~) but it is not going to be installed
   Depends: node-has-unicode (>= 2.0.1~) but it is not going to be installed
   Depends: node-hosted-git-info (>= 2.6~) but it is not going to be installed
   Depends: node-iferr (>= 0.1.5~) but it is not going to be installed
   Depends: node-inflight (>= 1.0.6~) but it is not going to be installed
   Depends: node-inherits (>= 2.0.3~) but it is not going to be installed
   Depends: node-ini (>= 1.3.5~) but it is not going to be installed
   Depends: node-npm-package-arg but it is not going to be installed
   Depends: node-promzard but it is not going to be installed
   Depends: node-jsonstream (>= 1.3.2~) but it is not going to be installed
   Depends: node-json-parse-better-errors (>= 1.0.1~) but it is not going to be installed
   Depends: node-lazy-property (>= 1.0~) but it is not going to be installed
   Depends: node-libnpx (>= 10.0.1~) but it is not going to be installed
   Depends: node-lockfile (>= 1.0.3~) but it is not going to be installed
   Depends: node-lru-cache (>= 4.1.1~) but it is not going to be installed
   Depends: node-mississippi (>= 3.0~) but it is not going to be installed
   Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
   Depends: node-move-concurrently (>= 1.0.1~) but it is not going to be installed
   Depends: node-nopt but it is not going to be installed
   Depends: node-normalize-package-data (>= 2.4~) but it is not going to be installed
   Depends: node-gyp (>= 3.6.2~) but it is not going to be installed
   Depends: node-resolve-from (>= 4.0~) but it is not going to be installed
   Depends: node-encoding but it is not going to be installed
   Depends: node-errno but it is not going to be installed
   Depends: node-npmlog (>= 4.1.2~) but it is not going to be installed
   Depends: node-once (>= 1.4~) but it is not going to be installed
   Depends: node-opener (>= 1.4.3~) but it is not going to be installed
   Depends: node-osenv (>= 0.1.5~) but it is not going to be installed
   Depends: node-path-is-inside (>= 1.0.2~) but it is not going to be installed
   Depends: node-promise-inflight (>= 1.0.1~) but it is not going to be installed
   Depends: node-ansi but it is not going to be installed
   Depends: node-qw (>= 1.0.1~) but it is not going to be installed
   Depends: node-read (>= 1.0.7~) but it is not going to be installed
   Depends: node-read-package-json (>= 2.0.13~) but it is not going to be installed
   Depends: node-request (>= 2.83~) but it is not going to be installed
   Depends: node-retry (>= 0.10.1~) but it is not going to be installed
   Depends: node-rimraf (>= 2.6.2~) but it is not going to be installed
   Depends: node-safe-buffer (>= 5.1.1~) but it is not going to be installed
   Depends: node-semver (>= 5.5~) but it is not going to be installed
   Depends: node-sha (>= 2.0.1~) but it is not going to be installed
   Depends: node-slide (>= 1.1.6~) but it is not going to be installed
   Depends: node-sorted-object (>= 2.0.1~) but it is not going to be installed
   Depends: node-from2 but it is not going to be installed
   Depends: node-stream-iterate but it is not going to be installed
   Depends: node-s-s-ri (>= 5.2.4~) but it is not going to be installed
   Depends: node-strip-ansi (>= 4.0~) but it is not going to be installed
   Depends: node-tar (>= 4.4~) but it is not going to be installed
   Depends: node-text-table (>= 0.2~) but it is not going to be installed
   Depends: node-uid-number (>= 0.0.6~) but it is not going to be installed
   Depends: node-unique-filename (>= 1.1~) but it is not going to be installed
   Depends: node-unpipe (>= 1.0~) but it is not going to be installed
   Depends: node-boxen (>= 1.2.1~) but it is not going to be installed
   Depends: node-import-lazy but it is not going to be installed
   Depends: node-is-npm (>= 1.0~) but it is not going to be installed
   Depends: node-latest-version (>= 3.0~) but it is not going to be installed
   Depends: node-semver-diff (>= 2.0~) but it is not going to be installed
   Depends: node-xdg-basedir (>= 3.0~) but it is not going to be installed
   Depends: node-validate-npm-package-name (>= 3.0~) but it is not going to be installed
   Depends: node-which (>= 1.3~) but it is not going to be installed
   Depends: node-wrappy (>= 1.0.2~) but it is not going to be installed
   Depends: node-write-file-atomic (>= 2.3~) but it is not going to be installed

【问题讨论】:

这不是全部输出,是吗? E: 无法纠正问题,您持有损坏的包裹。这是输出的最后一行... 【参考方案1】:

我认为这是几个类似帖子的重复。我记得,一些 linux 发行版不能很好地与 npm/node.js 一起使用 apt-get 进行安装。

例如,看看这个答案:

https://***.com/a/39981888/10826737

【讨论】:

以上是关于sudo apt install npm 它不起作用“以下软件包具有未满足的依赖项”的主要内容,如果未能解决你的问题,请参考以下文章

npm 命令 - sudo 与否?

python-dev如何安装 sudo apt-get install python-dev ?

sudo apt-get install 安装包失败

sudo apt-get install 安装包失败

sudo apt-get install 安装包失败

sudo apt-get install 国内源