![已安装 grub-pc 包安装后脚本子进程返回错误退出状态 10](https://linux22.com/image/1180461/%E5%B7%B2%E5%AE%89%E8%A3%85%20grub-pc%20%E5%8C%85%E5%AE%89%E8%A3%85%E5%90%8E%E8%84%9A%E6%9C%AC%E5%AD%90%E8%BF%9B%E7%A8%8B%E8%BF%94%E5%9B%9E%E9%94%99%E8%AF%AF%E9%80%80%E5%87%BA%E7%8A%B6%E6%80%81%2010.png)
当我尝试 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