zz-update-grube 退出,返回代码 127

zz-update-grube 退出,返回代码 127

在更新其中一台服务器时,我遇到了一个似乎无法解决的错误。我在 Google 上搜索并按照其他帖子上的说明操作,但都无法解决问题。我尝试过:

apt-get dist-upgrade

apt-get -f install

apt-get autoremove

我一直收到错误,有人知道下一步该怎么做吗?

Setting up linux-image-3.2.0-4-amd64 (3.2.63-2+deb7u1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
/usr/sbin/grub-mkconfig: 18: /etc/default/grub: o#GRUB_TERMINAL=console: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-4-amd64.postinst line 696, <STDIN> line 2.
dpkg: error processing linux-image-3.2.0-4-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-3.2.0-4-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

经过几个小时的搜索,我终于找到了问题所在。第 18 行/etc/default/grub是该行#GRUB_TERMINAL=console,如果您查看问题引发的错误代码,您会注意到o注释掉的行之前有一个。删除后,o问题就解决了。我很好奇它是怎么出现在那里的,因为我之前没有编辑过那个文件。也许是最近更新中的一个错误。

相关内容