无法在 Ubuntu 16.04 上更新内核“dpkg:处理包时出错”

无法在 Ubuntu 16.04 上更新内核“dpkg:处理包时出错”

我想更新我在云主机上使用的 Ubuntu VM 的内核,该内核目前停留在 2.6 版本。我在桌面上使用 Arch Linux,因此我习惯于我的包管理器每隔几天给我提供内核更新作为更新常规包的一部分,所以我希望运行“apt-get upgrade”可以解决这个问题。但当它完成后,我仍然在 2.6 版本。我发现这一页建议我使用以下命令安装一些软件包:

sudo apt-get install --install-recommends linux-generic-hwe-16.04

现在,当我尝试安装该软件包时,我收到以下消息。我尝试在 Google 上搜索解决方案,但没有找到。

root@server:~# sudo apt-get install --install-recommends linux-generic-hwe-16.04 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-generic-hwe-16.04 is already the newest version (4.10.0.42.44).
0 upgraded, 0 newly installed, 0 to remove and 4 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 linux-image-4.10.0-42-generic (4.10.0-42.46~16.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-42-generic
vmlinuz(/boot/vmlinuz-4.10.0-42-generic
) points to /boot/vmlinuz-4.10.0-42-generic
 (/boot/vmlinuz-4.10.0-42-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-42-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-42-generic /boot/vmlinuz-4.10.0-42-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-42-generic
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.10.0-42-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.10.0-42-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-42-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.10.0-42-generic:
 linux-image-extra-4.10.0-42-generic depends on linux-image-4.10.0-42-generic; however:
  Package linux-image-4.10.0-42-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.10.0-42-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-16.04:
 linux-image-generic-hwe-16.04 depends on linux-image-4.10.0-42-generic; however:
  Package linux-image-4.10.0-42-generic is not configured yet.
 linux-image-generic-hwe-16.04 depends on linux-image-extra-4.10.0-42-generic; however:
  Package linux-image-extra-4.10.0-42-generic is not configured yet.

dpkg: error processing package linux-image-generic-hwe-16.04 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-16.04:
 linux-generic-hwe-16.04 depends on linux-image-generic-hwe-16.04 (= 4.10.0.42.44); however:
  Package linux-image-generic-hwe-16.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-16.04 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.10.0-42-generic
 linux-image-extra-4.10.0-42-generic
 linux-image-generic-hwe-16.04
 linux-generic-hwe-16.04
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是我在解决与我的问题类似的问题的帖子中找到的命令的输出:

root@server:~# dpkg -l | grep linux-image*
iF  linux-image-4.10.0-42-generic       4.10.0-42.46~16.04.1                  amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
iU  linux-image-extra-4.10.0-42-generic 4.10.0-42.46~16.04.1                  amd64        Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
iU  linux-image-generic-hwe-16.04       4.10.0.42.44                          amd64        Generic Linux kernel image

相关内容