当我尝试 make 时,apt upgrade
它返回 4 个未完全安装的软件包:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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
Setting up grub-pc (2.04-1ubuntu26.8) ...
dpkg: error processing package grub-pc (--configure):
installed grub-pc package post-installation script subprocess returned error exit status 10
Setting up gconf2-common (3.2.6-6ubuntu1) ...
dpkg: error processing package gconf2-common (--configure):
installed gconf2-common package post-installation script subprocess returned error exit status 10
Setting up gdm3 (3.36.3-0ubuntu0.20.04.3) ...
dpkg: error processing package gdm3 (--configure):
installed gdm3 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
grub-efi-amd64-signed depends on grub-efi-amd64 | grub-pc; however:
Package grub-efi-amd64 is not installed.
Package grub-pc is not configured yet.
dpkg: error processing package grub-efi-amd64-signed (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
grub-pc
gconf2-common
gdm3
grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试强制安装sudo apt-get reinstall -f gconf2-common grub-pc gdm3
,但同样失败
答案1
我发现唯一的解决方案是从有问题的包.postinst
中删除文件。例如文件/var/lib/dpkg/info/
grub-pc.postinst