编辑以获取更多上下文。用于解决问题的建议链接重点是删除损坏的包。如果我尝试删除该sysvinit-utils
包,我会得到如下所示的输出(依赖项的长列表lsb-base
),并且删除失败。因此建议的链接无法解决它,我尝试了几个附加选项,例如直接使用 dpkg 删除软件包,但同样的情况发生。所以我陷入了循环。
建议的重复链接 此链接无法修复此问题,请查看我的请求内容,您会发现这是一个“简单”的非必需包,需要删除。它不能解决我的问题,因此是我提出此请求的原因。
我想在 Ubuntu 22.04 中将 smartmontools 更新到 7.4(不适用于 ubu22,版本 7.4 不可用),所以我使用 dpkg 安装了最新版本,然后需要几个依赖项,所以我还安装了最新版本的 sysvinit-utils (3.08 -6ubuntu2,同样不适用于 ubu22),然后是 libc6 的依赖项,由于额外的依赖项,我不想这样做。因此,在尝试恢复更改时,我遇到了以下问题:
现在,当我想运行 apt Upgrade 时,我得到:
sudo apt upgrade
[sudo] password for niels:
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:
sysvinit-utils : Depends: libc6 (>= 2.38) but 2.35-0ubuntu3.6 is 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... failed.
The following packages have unmet dependencies:
sysvinit-utils : Depends: libc6 (>= 2.38) but 2.35-0ubuntu3.6 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
我无法将 sysvinit-utils 降级到以前的版本:
sudo apt install sysvinit-utils=3.01-1ubuntu1
[sudo] password for niels:
Sorry, try again.
[sudo] password for niels:
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:
acpid : Depends: lsb-base (>= 3.2-14)
---snip---
unattended-upgrades : Depends: lsb-base
x11-common : Depends: lsb-base (>= 1.3-9ubuntu2)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我尝试按照此处的建议进行操作,但我不断回到同一问题: How to downgrade a package via apt-get?
对于如何解决这个问题,有任何的建议吗?