AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1519209
Accepted
Apogentus
Apogentus
Asked: 2024-07-01 19:35:10 +0800 CST2024-07-01 19:35:10 +0800 CST 2024-07-01 19:35:10 +0800 CST

未满足的依赖关系。‘apt --fix-broken install’ 不起作用

  • 772

当我尝试安装时(在最近从 Ubuntu 23.10 升级到 Ubuntu 24.04)

sudo apt install npm

我明白了

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 npm : Depends: node-abbrev but it is not going to be installed
       Depends: node-agent-base but it is not going to be installed
       Depends: node-aproba but it is not going to be installed
       Depends: node-archy but it is not going to be installed
       Depends: node-base64-js but it is not going to be installed
       Depends: node-binary-extensions but it is not going to be installed
       Depends: node-cacache (>= 17) but it is not going to be installed
       Depends: node-chalk (>= 5.1.2-2~) but it is not going to be installed
       Depends: node-chownr but it is not going to be installed
       Depends: node-ci-info but it is not going to be installed
       Depends: node-cli-table3
       Depends: node-colors but it is not going to be installed
       Depends: node-columnify but it is not going to be installed
       Depends: node-cssesc
       Depends: node-debug but it is not going to be installed
       Depends: node-depd but it is not going to be installed
       Depends: node-diff but it is not going to be installed
       Depends: node-emoji-regex
       Depends: node-encoding but it is not going to be installed
       Depends: node-events but it is not going to be installed
       Depends: node-glob but it is not going to be installed
       Depends: node-got but it is not going to be installed
       Depends: node-graceful-fs but it is not going to be installed
       Depends: node-gyp but it is not going to be installed
       Depends: node-hosted-git-info (>= 6) but it is not going to be installed
       Depends: node-http-proxy-agent but it is not going to be installed
       Depends: node-https-proxy-agent but it is not going to be installed
       Depends: node-ieee754 but it is not going to be installed
       Depends: node-ini but it is not going to be installed
       Depends: node-ip but it is not going to be installed
       Depends: node-ip-regex but it is not going to be installed
       Depends: node-json-parse-better-errors but it is not going to be installed
       Depends: node-jsonparse but it is not going to be installed
       Depends: node-lru-cache but it is not going to be installed
       Depends: node-minimatch but it is not going to be installed
       Depends: node-minipass but it is not going to be installed
       Depends: node-mkdirp but it is not going to be installed
       Depends: node-ms but it is not going to be installed
       Depends: node-negotiator but it is not going to be installed
       Depends: node-nopt but it is not going to be installed
       Depends: node-normalize-package-data but it is not going to be installed
       Depends: node-npm-bundled but it is not going to be installed
       Depends: node-npm-normalize-package-bin
       Depends: node-npm-package-arg (>= 10) but it is not going to be installed
       Depends: node-npmlog but it is not going to be installed
       Depends: node-once but it is not going to be installed
       Depends: node-p-map but it is not going to be installed
       Depends: node-postcss-selector-parser
       Depends: node-promise-retry but it is not going to be installed
       Depends: node-promzard but it is not going to be installed
       Depends: node-read but it is not going to be installed
       Depends: node-read-package-json but it is not going to be installed
       Depends: node-rimraf but it is not going to be installed
       Depends: node-semver but it is not going to be installed
       Depends: node-ssri but it is not going to be installed
       Depends: node-string-width but it is not going to be installed
       Depends: node-strip-ansi but it is not going to be installed
       Depends: node-tar but it is not going to be installed
       Depends: node-text-table but it is not going to be installed
       Depends: node-validate-npm-package-license but it is not going to be installed
       Depends: node-validate-npm-package-name but it is not going to be installed
       Depends: node-which but it is not going to be installed
       Depends: node-wrappy but it is not going to be installed
       Depends: node-write-file-atomic but it is not going to be installed
       Depends: node-yallist but it is not going to be installed
       Depends: nodejs:any
       Recommends: node-tap but it is not going to be installed
 wine-devel-amd64 : Depends: libasound2-plugins but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

当我跑步时sudo apt --fix-broken install我得到

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  mailcap
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libasound2-plugins
The following NEW packages will be installed:
  libasound2-plugins
0 upgraded, 1 newly installed, 0 to remove and 106 not upgraded.
177 not fully installed or removed.
Need to get 0 B/74.8 kB of archives.
After this operation, 402 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 533433 files and directories currently installed.)
Preparing to unpack .../libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb ...
Unpacking libasound2-plugins:amd64 (1.2.7.1-1ubuntu5) ...
dpkg: error processing archive /var/cache/apt/archives/libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb (--unpack):
 trying to overwrite shared '/etc/alsa/conf.d/99-pulseaudio-default.conf.example', which is different from other instances of package libasound2-plugi
ns:amd64
Errors were encountered while processing:
 /var/cache/apt/archives/libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果我尝试删除 wine(我有开发版本):sudo apt remove winehq-devel或者sudo apt-get --purge remove wine我遇到同样的问题:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 wine-devel-amd64 : Depends: libasound2-plugins but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt
  • 1 1 个回答
  • 72 Views

1 个回答

  • Voted
  1. Best Answer
    Apogentus
    2024-07-01T20:25:45+08:002024-07-01T20:25:45+08:00

    看来我已经解决了这个问题。我运行sudo dpkg -l | grep '^.[^i]'并删除了所有与 wine 相关的软件包:

    sudo dpkg --purge --force-all winehq-devel winehq-stable-i386:i386 winehq-stable-i386 wine-stable-amd64 wine-stable wine-devel-i386:i386 wine-devel-amd64
    
    sudo apt autoremove
    

    此后问题就消失了。

    • 1

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve