apt-get 报告“dpkg:处理触发器时发现循环”

apt-get 报告“dpkg:处理触发器时发现循环”

在我的另一个关于如何在软件包安装过程中禁止询问命令行我找到了答案。不幸的是,我已经陷入下一个问题了。

apt-get命令(更准确地说:dpkg,由 调用apt-get)面临递归触发的问题:

[...]
Processing triggers for initramfs-tools (0.122ubuntu8.12) ...
[...]
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.12) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-135-generic
[...]
Preparing to unpack .../initramfs-tools_0.122ubuntu8.14_all.deb ...
Unpacking initramfs-tools (0.122ubuntu8.14) over (0.122ubuntu8.12) ...
[...]
Preparing to unpack .../ca-certificates_20170717~16.04.2_all.deb ...
Unpacking ca-certificates (20170717~16.04.2) over (20170717~16.04.1) ...
[...]
Setting up initramfs-tools (0.122ubuntu8.14) ...
update-initramfs: deferring update (trigger activated)
[...]
Setting up ca-certificates (20170717~16.04.2) ...
[...]
Processing triggers for initramfs-tools (0.122ubuntu8.14) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-135-generic
dpkg: cycle found while processing triggers:
 chain of packages whose triggers are or may be responsible:
  initramfs-tools -> ca-certificates
 packages' pending triggers which are or may be unresolvable:
  ca-certificates: update-ca-certificates
  resolvconf: resolvconf-enable-updates
  initramfs-tools: update-initramfs
dpkg: error processing package ca-certificates (--configure):
 triggers looping, abandoned
Processing triggers for resolvconf (1.78ubuntu7) ...
Processing triggers for initramfs-tools (0.122ubuntu8.14) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-135-generic
Errors were encountered while processing:
 ca-certificates
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)

不知为何,我不明白它的意思,因为它ca-certificates没有提及initramfs-tools(至少据我所知)。

我手动登录该系统,并apt-get使用该--fix-broken选项执行了相同的调用。不知怎的,问题就解决了。

我在我的更新程序中实现了这一点,因此apt-get从一开始就使用该选项执行。但我一直收到相同的错误。这意味着该选项可能会在之后解决问题,但不会修复更新过程中的问题。

有谁知道如何防止该问题发生吗?

答案1

与此同时,我发现这只是我遇到的另一个问题的后续错误。我安装/更新的软件包存在依赖性问题。自从我解决了这个问题后,一切都正常了。

我还认为这个问题不会有任何解决办法。

相关内容