更新内核后如何修复我的 apt-get?

更新内核后如何修复我的 apt-get?

我将内核更改为 4.8.10(ubuntu 16.04 LTS),现在,当我尝试安装软件时,会出现失败,错误消息中提到了旧内核。有没有办法配置 apt-get 或任何 deb 包安装程序,以便它可以使用当前内核并允许我安装新应用程序?谢谢,

重新解释:当我尝试使用 apt-get 安装时,我收到此消息:

  depmod: FATAL: could not load /boot/System.map-4.4.0-51-generic: No such file or directory
  run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-51-generic /boot/vmlinuz-4.4.0-51-generic
  run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-51-generic /boot/vmlinuz-4.4.0-51-generic
  update-initramfs: Generating /boot/initrd.img-4.4.0-51-generic
  WARNING: missing /lib/modules/4.4.0-51-generic
  Ensure all necessary drivers are built into the linux image!
  depmod: ERROR: could not open directory /lib/modules/4.4.0-51-generic: 

  No such file or directory


  depmod: FATAL: could not search modules: No such file or directory


  depmod: WARNING: could not open /var/tmp/mkinitramfs_otbcX4/lib/modules

  /4.4.0-51-generic/modules.order: No such file or directory


  depmod: WARNING: could not open /var/tmp/mkinitramfs_otbcX4/lib/modules

  /4.4.0-51-generic/modules.builtin: No such file or directory


  run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-51-generic 

  /boot/vmlinuz-4.4.0-51-generic


  run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 

  4.4.0-51-generic /boot/vmlinuz-4.4.0-51-generic


  run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-51-

  generic /boot/vmlinuz-4.4.0-51-generic


  run-parts: executing /etc/kernel/postinst.d/zz-runlilo 4.4.0-51-generic 

  /boot/vmlinuz-4.4.0-51-generic


  Fatal: open /dev/disk/by-id/: Is a directory


  run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1


  dpkg: error processing package linux-image-extra-4.4.0-51-generic 

  (--remove):


   subprocess installed post-removal script returned error exit status 1


  Errors were encountered while processing:


   linux-image-extra-4.4.0-51-generic


  E: Sub-process /usr/bin/dpkg returned an error code (1)

我看到的是它正在尝试使用我之前的内核,因此取消了安装。我需要找到一种方法来解决这个问题。这样清楚一点吗?

提前致谢!

uname-a Linux raphael-Lenovo-YOGA-300-11IBY 4.8.10-040810-generic #201611210531 SMP 星期一 11 月 21 日 10:33:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a

    lsb_release: error: No arguments are permitted
    lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04 LTS
    Release:    16.04
    Codename:   xenial
    [1]+  Exit 2                  lsb_release -

dpkg-query -l linux-image-* linux-headers-* | grep -e '^i'

    ii  linux-headers-4.4.0-45   4.4.0-45.66 all  Header files related to Linux kernel version 4.4.0

    ii  linux-headers-4.4.0-45-generic        4.4.0-45.66                  amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP

    ii  linux-headers-4.4.0-53                4.4.0-53.74                  all          Header files related to Linux kernel version 4.4.0

    ii  linux-headers-4.4.0-53-generic        4.4.0-53.74                  amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP

    ii  linux-headers-4.6.4-040604            4.6.4-040604.201607111332    all          Header files related to Linux kernel version 4.6.4

    ii  linux-headers-4.6.4-040604-generic    4.6.4-040604.201607111332    amd64        Linux kernel headers for version 4.6.4 on 64 bit x86 SMP

    ii  linux-headers-4.7.0-040700rc3         4.7.0-040700rc3.201606121131 all          Header files related to Linux kernel version 4.7.0

    ii  linux-headers-4.7.0-040700rc3-generic 4.7.0-040700rc3.201606121131 amd64        Linux kernel headers for version 4.7.0 on 64 bit x86 SMP

    ii  linux-headers-4.8.10-040810           4.8.10-040810.201611210531   all          Header files related to Linux kernel version 4.8.10

    ii  linux-headers-4.8.10-040810-generic   4.8.10-040810.201611210531   amd64        Linux kernel headers for version 4.8.10 on 64 bit x86 SMP

    ii  linux-headers-generic                 4.4.0.53.56 amd64        Generic Linux kernel headers

    ii  linux-image-4.4.0-45-generic          4.4.0-45.66 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP

    ii  linux-image-4.4.0-53-generic          4.4.0-53.74 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP


    ii  linux-image-4.6.4-040604-generic      4.6.4-040604.201607111332    amd64        Linux kernel image for version 4.6.4 on 64 bit x86 SMP


    ii  linux-image-4.7.0-040700rc3-generic   4.7.0-040700rc3.201606121131 amd64        Linux kernel image for version 4.7.0 on 64 bit x86 SMP

    ii  linux-image-4.8.10-040810-generic     4.8.10-040810.201611210531   amd64        Linux kernel image for version 4.8.10 on 64 bit x86 SMP

    ii  linux-image-extra-4.4.0-45-generic    4.4.0-45.66                  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

    ii  linux-image-extra-4.4.0-53-generic    4.4.0-53.74                  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

    ii  linux-image-generic                   4.4.0.53.56                  amd64        Generic Linux kernel image

相关内容