sudo apt upgrade
显示以下错误
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
locales : Depends: libc-bin (> 2.37)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
apt --fix-broken install
显示以下错误,当我尝试修复损坏的安装时,突触包管理器中也显示了相同的错误
The following packages have unmet dependencies:
libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
locales : Depends: libc-bin (> 2.37)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
sudo dpkg --configure -a
命令显示以下错误:
dpkg: dependency problems prevent processing triggers for libc-bin:
libc-bin depends on libc6 (<< 2.36); however:
Version of libc6:amd64 on system is 2.37-12.
dpkg: error processing package libc-bin (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
libc-bin
sudo apt-get install -f
显示以下错误
Correcting dependencies... failed.
The following packages have unmet dependencies:
libc-bin : Depends: libc6 (< 2.36) but 2.37-12 is installed
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.37-12 is installed
Depends: libc-dev-bin (= 2.35-0ubuntu3.6)
locales : Depends: libc-bin (> 2.37)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
sudo apt install libc6="2.35-0ubuntu3.6"
显示以下错误:
You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libc-dev-bin : Depends: libc6 (> 2.37) but 2.35-0ubuntu3.6 is to be installed libc6-dbg : Depends: libc6 (= 2.37-12) but 2.35-0ubuntu3.6 is to be installed libc6-dev : Depends: libc-dev-bin (= 2.35-0ubuntu3.6) locales : Depends: libc-bin (> 2.37) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我尝试了网上的很多方法,但都显示这 2 或 3 个错误之一。请帮我修复它。请帮帮我!谢谢
apt policy libc6
显示以下输出
libc6:
Installed: 2.37-12
Candidate: 2.37-12
Version table:
*** 2.37-12 100
100 /var/lib/dpkg/status
2.35-0ubuntu3.6 500
500 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
2.35-0ubuntu3 500
500 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
这个问题有修复的可能吗?我实际上尝试在我的 ubuntu 22.04 机器上安装 katoolin,但一切都很顺利,直到系统升级,当它开始升级时,它显示了上述错误。请帮我修复它?
输出 sudo dpkg -l | grep '^.[^i]'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================================-=======================================-============-================================================================================
rc linux-image-6.2.0-26-generic 6.2.0-26.26~22.04.1 amd64 Signed kernel image generic
rc linux-image-6.2.0-39-generic 6.2.0-39.40~22.04.1 amd64 Signed kernel image generic
rc linux-modules-6.2.0-26-generic 6.2.0-26.26~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-6.2.0-39-generic 6.2.0-39.40~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-extra-6.2.0-26-generic 6.2.0-26.26~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-extra-6.2.0-39-generic 6.2.0-39.40~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc node-esprima 4.0.1+ds+~4.0.3-2 all ECMAScript parsing infrastructure for multipurpose analysis
rc node-mime 3.0.0+dfsg+~cs3.96.1-1 all library for mime-type mapping for Node.js
rc node-source-map 0.7.0++dfsg2+really.0.6.1-9 all Mozilla source map generator and consumer - Node.js module
rc node-sprintf-js 1.1.2+ds1+~1.1.2-1 all Node.js Pure JavaScript sprintf implementation
rc npm 8.5.1~ds-1 all package manager for Node.js
输出uname -a
Linux ciph3r-Inspiron-3537 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
答案1
的输出显示sudo dpkg -l | grep '^.[^i]'
,您可以使用 删除以下软件包dpkg --remove ...
(这些软件包已列出rc
)。您需要清除所有软件包。让我们使用以下命令删除它们:
sudo dpkg --purge --force-all linux-image-6.2.0-26-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-26-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-26-generic linux-modules-extra-6.2.0-39-generic node-esprima node-mime node-source-map node-sprintf-js npm
现在,运行以下命令:
sudo apt-get clean
sudo apt-get update
sudo apt-get --fix-broken install
我不确定问题是否会得到解决,因为输出sudo dpkg -l | grep '^.[^i]'
除了一些旧配置文件的残留外没有太多内容。输出中还有其他内容吗?但是,您可以尝试一下。如果它没有帮助,您应该备份数据并重新安装系统。