处理 linux-generic-lts-quantal 时出错,依赖性问题 - 未配置

处理 linux-generic-lts-quantal 时出错,依赖性问题 - 未配置

这是在今天早上 dist-upgrade 期间发生的,同时还发生了 apport 失败。

:~$ sudo apt-get dist-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.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Setting up linux-image-3.5.0-32-generic (3.5.0-32.53~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
update-initramfs: Generating /boot/initrd.img-3.5.0-32-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-32-generic /boot/vmlinuz-3.5.0-32-generic
/usr/sbin/grub-mkconfig: 36: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.5.0-32-generic.postinst line 1010.
dpkg: error processing linux-image-3.5.0-32-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
 linux-image-generic-lts-quantal depends on linux-image-3.5.0-32-generic; however:
  Package linux-image-3.5.0-32-generic is not configured yet.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-quantal:
 linux-generic-lts-quantal depends on linux-image-generic-lts-quantal; however:
  Package linux-image-generic-lts-quantal is not configured yet.
dpkg: error processing linux-generic-lts-quantal (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Errors were encountered while processing:
 linux-image-3.5.0-32-generic
 linux-image-generic-lts-quantal
 linux-generic-lts-quantal
E: Sub-process /usr/bin/dpkg returned an error code (1)

经报告:

https://bugs.launchpad.net/ubuntu/+source/grub-pc/+filebug/f276b6c8-c9ff-11e2-ae36-68b5996a96c8?field.title=package+linux-image-3.5.0-32-generic+3.5.0-32.53~precise1+failed+to+install%2Fupgrade%3A+run-parts%3A+%2Fetc%2Fkernel%2Fpostinst.d%2Fzz-update-grub+exited+with+return+code+2

和“Launchpad.net〜丢失了什么?〜该页面不存在,或者您可能没有权限查看它。”

这是一个简单的 Mythbuntu/XFCE4 x86_64 系统,作为 HTPC 的一部分。

答案1

下列的贡特伯特的回答未满足的依赖项:linux-generic...

我跑了

apt-get remove linux-generic
apt-get install linux-generic
apt-get update
apt-get dist-upgrade
update-grub

这解决了问题。

答案2

第一个错误是从哪里开始寻找的:

/usr/sbin/grub-mkconfig:36:/etc/default/grub:语法错误:反引号替换中的 EOF

由于 /etc/default/grub — 与 /etc/default 中的大多数文件一样 — 由不会发生太大变化的 shell 变量声明组成,因此我怀疑该文件已被更改。

这对你的启动盘来说可能也是一个好主意fsck,因为没有太多东西会改变文件。有趣的是,标准发行版文件(可以在 /usr/share/grub/default/grub 中找到)只有 34 行,这支持了以下猜测:某些东西或某些人破坏了 /etc/default/grub。

相关内容