Pop!_OS 因未配置 zlib1g 而无法升级软件包

Pop!_OS 因未配置 zlib1g 而无法升级软件包

每当打开 Pop Shop 时,它就会冻结并崩溃。更新中通过 aptitude 打包是可行的,但是升级失败了

dpkg: dependency problems prevent processing triggers for libglib2.0-0:i386:
 libglib2.0-0:i386 depends on zlib1g (>= 1:1.2.2); however:
  Package zlib1g:i386 is not configured yet.

dpkg: error processing package libglib2.0-0:i386 (--configure):
 dependency problems - leaving triggers unprocessed

zlib1g 似乎已正确安装并sudo apt install最终触发相同的错误:

$ sudo apt install zlib1g:i386
[sudo] password for redhand: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
zlib1g:i386 is already the newest version (1:1.2.11.dfsg-2ubuntu7.1).
zlib1g:i386 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: dependency problems prevent processing triggers for libglib2.0-0:i386:
 libglib2.0-0:i386 depends on zlib1g (>= 1:1.2.2); however:
  Package zlib1g:i386 is not configured yet.

dpkg: error processing package libglib2.0-0:i386 (--configure):
 dependency problems - leaving triggers unprocessed

尝试修复损坏的依赖关系告诉我 zlib1g 肯定已安装并且是最新的。

$ sudo apt install -f zlib1g
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
zlib1g is already the newest version (1:1.2.11.dfsg-2ubuntu7.1).

我该如何解决?

答案1

sudo dpkg --configure -a解决了问题。

在某些情况下,可能需要遵循 sudo apt --fix-broken install

相关内容