问题: 在每次用apt-get或者pip安装完软件后,出现package grub-efi-amd64 is not configured yet 和dpkg: error processing package grub-efi-amd64-signed(--configure): 的错误。
2 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-efi-amd64 (2.02~beta2-22ubuntu1.5) ...
dpkg: error processing package grub-efi-amd64 (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of grub-efi-amd64-signed:
grub-efi-amd64-signed depends on grub-efi-amd64 (= 2.02~beta2-22ubuntu1.5); however:
Package grub-efi-amd64 is not configured yet.
dpkg: error processing package grub-efi-amd64-signed (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
grub-efi-amd64
grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方法:
$sudo gedit //var/lib/dpkg/info/grub-efi-amd64.postinst
在set e后, 下一行,输入: exit 0
保存后,在终端运行命令:
$sudo dpkg --configure -a
原因:
这是ubuntu的一个bug, 是在更新后postinstall script没有很好的clean up. 以上解决方法强制提前退出。
Reference:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1178534