未满足的依赖关系和损坏的软件包错误 ubuntu 22.04

未满足的依赖关系和损坏的软件包错误 ubuntu 22.04

sudo apt update 显示以下错误

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 安装显示以下错误,当我尝试修复损坏的安装时,突触包管理器中也显示相同的错误

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

我已经从互联网上尝试了很多方法,但所有内容都显示这 2 或 3 个错误之一。请帮助我修复它。请,请帮助!谢谢

apt 策略 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,但一切都很顺利,直到系统升级,当它开始升级时,它显示了上述错误。请帮我修复它吗?

尝试降级 libc6 但命令 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).

答案1

您需要libc6同时降级所有相关的软件包:

sudo apt install libc6{,-dev-bin,-dbg,-dev,-bin}/jammy locales/jammy

看来您已经部分升级到 Debian不稳定版;其他软件包也可能受到影响。

答案2

为什么你的系统坏了?

执行中卡托林脚本将以下行添加到您的/etc/apt/sources.list

deb http://http.kali.org/kali kali-rolling main contrib non-free

PPA:diesch/测试(此 ppa 无害,但与 不兼容jammy

解决问题的方法:

首先,正如文中所说卡托林文档,您应该删除 kali 存储库:

在更新系统之前,请删除所有 Kali-linux 存储库以避免出现任何问题。

sudo apt update
sudo apt --fix-broken install

相关内容