Unable to upgrade kernel after 4.16.3

Fabi0_Z

I'm running on Ubuntu 16.04 with 4.16.3 Kernel, both on my desktop and laptop, every time I try to upgrade to a newer kernel with UKUU fails the configuration of the package and return me this error (example installing 4.16.6):

dpkg: error processing package linux-image-unsigned-4.16.6-041606-generic (--install):
dependency problems - leaving unconfigured

And the only solution is to remove it, how can i solve it?

WinEunuuchs2Unix

October 28, 2018 Update

For dkms support of nVidia, bbswitch and virtual box compiling use:

sudo apt install libelf-dev

To circumvent newer linux-header installation errors download: libssl1.1

Download the newer kernels you want and your ~/Downloads should look like this:

$ ll *.deb
-rw-rw-r-- 1 rick rick  1128420 Oct 28 08:33 libssl1.1_1.1.0g-2ubuntu4.1_amd64.deb
-rw-rw-r-- 1 rick rick 10741128 Oct 28 08:05 linux-headers-4.14.78-041478_4.14.78-041478.201810200529_all.deb
-rw-rw-r-- 1 rick rick  1052200 Oct 28 08:05 linux-headers-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb
-rw-rw-r-- 1 rick rick  8243552 Oct 28 08:05 linux-image-unsigned-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb
-rw-rw-r-- 1 rick rick 47559380 Oct 28 08:06 linux-modules-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb

Now you should be able to successfully install:

sudo dpkg -i *.deb

Original Answer

Kernels 4.14.xx, 4.16.xx and 4.17.rc(xx) all share the same bug over this last week; April 24-30, 2018.

I just tried 4.14.38 tonight and it exhibits the same errors as 4.14.36 and 4.14.37 as documented in this bug report.

In my case tonight the errors are:

$ sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-4.14.38-041438.
(Reading database ... 641792 files and directories currently installed.)
Preparing to unpack linux-headers-4.14.38-041438_4.14.38-041438.201804300419_all.deb ...
Unpacking linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-headers-4.14.38-041438-generic.
Preparing to unpack linux-headers-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-headers-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-image-unsigned-4.14.38-041438-generic.
Preparing to unpack linux-image-unsigned-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-modules-4.14.38-041438-generic.
Preparing to unpack linux-modules-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Setting up linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
dpkg: dependency problems prevent configuration of linux-headers-4.14.38-041438-generic:
 linux-headers-4.14.38-041438-generic depends on libssl1.1 (>= 1.1.0); however:
  Package libssl1.1 is not installed.

dpkg: error processing package linux-headers-4.14.38-041438-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--install):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 linux-headers-4.14.38-041438-generic
 linux-image-unsigned-4.14.38-041438-generic

To fix errors I tried sudo apt install -f but it won't fix it plus causes a "crash report":

Kernel 4.14.38 crash.png

Using sudo rm-kernels I removed 4.14.38 as much as I could:

remove 4.14.38 kernel

This time around only the headers were successfully removed:

The following packages will be REMOVED:
  linux-headers-4.14.38-041438*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 74.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 665813 files and directories currently installed.)
Removing linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 linux-image-unsigned-4.14.38-041438-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now let's see what is left over:

$ apt list | grep 4.14.36

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-image-unsigned-4.14.36-041436-generic/now 4.14.36-041436.201804240906 amd64 [residual-config]

Let's try to remove it:

$ sudo apt remove linux-modules-4.14.38-041438-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-unsigned-4.14.38-041438-generic linux-modules-4.14.38-041438-generic
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
After this operation, 296 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 641771 files and directories currently installed.)
Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: 11: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: linux-check-removal: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--remove):
 subprocess installed pre-removal script returned error exit status 127
dpkg: linux-modules-4.14.38-041438-generic: dependency problems, but removing anyway as you requested:
 linux-image-unsigned-4.14.38-041438-generic depends on linux-modules-4.14.38-041438-generic.

Removing linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Errors were encountered while processing:
 linux-image-unsigned-4.14.38-041438-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit the file /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm:

#!/bin/sh
set -e

version=4.14.38-041438-generic
image_path=/boot/vmlinuz-$version
    (... SNIP ...)

Just below the first line #!/bin/sh insert a new line:

exit 0

Save the file and rerun the failed command:

$ sudo apt remove linux-image-unsigned-4.14.38-041438-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-unsigned-4.14.38-041438-generic
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 8,663 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 635588 files and directories currently installed.)
Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postrm ... removing pending trigger
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.14.38-041438-generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background: /home/rick/Pictures/1600x900/19.jpg
Found background image: /home/rick/Pictures/1600x900/19.jpg
Found linux image: /boot/vmlinuz-4.14.34-041434-generic
Found initrd image: /boot/initrd.img-4.14.34-041434-generic
Found linux image: /boot/vmlinuz-4.14.31-041431-generic
Found initrd image: /boot/initrd.img-4.14.31-041431-generic
Found linux image: /boot/vmlinuz-4.14.30-041430-generic
Found initrd image: /boot/initrd.img-4.14.30-041430-generic
Found linux image: /boot/vmlinuz-4.14.27-041427-generic
Found initrd image: /boot/initrd.img-4.14.27-041427-generic
Found linux image: /boot/vmlinuz-4.14.15-041415-generic
Found initrd image: /boot/initrd.img-4.14.15-041415-generic
Found linux image: /boot/vmlinuz-4.14.10-041410-generic
Found initrd image: /boot/initrd.img-4.14.10-041410-generic
Found linux image: /boot/vmlinuz-4.14.4-041404-generic
Found initrd image: /boot/initrd.img-4.14.4-041404-generic
Found linux image: /boot/vmlinuz-4.14.2-041402-generic
Found initrd image: /boot/initrd.img-4.14.2-041402-generic
Found linux image: /boot/vmlinuz-4.13.9-041309-generic
Found initrd image: /boot/initrd.img-4.13.9-041309-generic
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.9.77-040977-generic
Found initrd image: /boot/initrd.img-4.9.77-040977-generic
Found linux image: /boot/vmlinuz-4.4.0-104-generic
Found initrd image: /boot/initrd.img-4.4.0-104-generic
Found linux image: /boot/vmlinuz-4.4.0-103-generic
Found initrd image: /boot/initrd.img-4.4.0-103-generic
Found linux image: /boot/vmlinuz-3.16.53-031653-generic
Found initrd image: /boot/initrd.img-3.16.53-031653-generic
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 18.04 LTS (18.04) on /dev/nvme0n1p8
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

Double check everything is ok:

$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Upgrade linux kernel 3 to 4 in Debian 8

From Dev

VMware Player unable to start after upgrade linux kernel to latest version

From Dev

No more 4K Screen Resolution after Kernel Upgrade

From Dev

Module disabled after kernel upgrade

From Dev

After upgrade to 13.10 64-bit I am unable to update kernel

From Dev

After upgrade to 13.10 64-bit I am unable to update kernel

From Dev

Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade?

From Dev

Kernel panic after attempting to upgrade to Ubuntu 14.04

From Dev

Dropbox service not starting automatically after kernel upgrade

From Dev

Kernel panic after attempting to upgrade to Ubuntu 14.04

From Dev

Dropbox service not starting automatically after kernel upgrade

From Dev

GRUB Customizer stopped working after kernel upgrade

From Dev

How is Grub updated after each kernel upgrade?

From Dev

zpool missing after kernel upgrade attempt

From Dev

Hibernation disappeared in Ubuntu 16.04 after a kernel upgrade

From Dev

Ubuntu won't boot after kernel upgrade

From Dev

How to Upgrade Kernel After Permenant Downgrade?

From Dev

dkms does not automatically rebuild after kernel upgrade

From Dev

No wifi after kernel upgrade to 4.15 OR 4.16

From Dev

Don't see new kernel after upgrade

From Dev

PCSX2 not working after kernel upgrade

From Dev

Displaylink driver do not work after kernel upgrade

From Dev

Kernel panic on boot after upgrade to 20.04.1

From Dev

Unattended grub configuration after kernel upgrade

From Dev

Wrong kernel after upgrade --- old kernel still installed?

From Dev

Wrong kernel after upgrade --- old kernel still installed?

From Dev

Device not managed after upgrade to ubuntu 16

From Dev

Vagrant unable to mount SMB after upgrade to 1.7.4

From Dev

Unable to start VMWare Workstation after upgrade to 13.04

Related Related

  1. 1

    Upgrade linux kernel 3 to 4 in Debian 8

  2. 2

    VMware Player unable to start after upgrade linux kernel to latest version

  3. 3

    No more 4K Screen Resolution after Kernel Upgrade

  4. 4

    Module disabled after kernel upgrade

  5. 5

    After upgrade to 13.10 64-bit I am unable to update kernel

  6. 6

    After upgrade to 13.10 64-bit I am unable to update kernel

  7. 7

    Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade?

  8. 8

    Kernel panic after attempting to upgrade to Ubuntu 14.04

  9. 9

    Dropbox service not starting automatically after kernel upgrade

  10. 10

    Kernel panic after attempting to upgrade to Ubuntu 14.04

  11. 11

    Dropbox service not starting automatically after kernel upgrade

  12. 12

    GRUB Customizer stopped working after kernel upgrade

  13. 13

    How is Grub updated after each kernel upgrade?

  14. 14

    zpool missing after kernel upgrade attempt

  15. 15

    Hibernation disappeared in Ubuntu 16.04 after a kernel upgrade

  16. 16

    Ubuntu won't boot after kernel upgrade

  17. 17

    How to Upgrade Kernel After Permenant Downgrade?

  18. 18

    dkms does not automatically rebuild after kernel upgrade

  19. 19

    No wifi after kernel upgrade to 4.15 OR 4.16

  20. 20

    Don't see new kernel after upgrade

  21. 21

    PCSX2 not working after kernel upgrade

  22. 22

    Displaylink driver do not work after kernel upgrade

  23. 23

    Kernel panic on boot after upgrade to 20.04.1

  24. 24

    Unattended grub configuration after kernel upgrade

  25. 25

    Wrong kernel after upgrade --- old kernel still installed?

  26. 26

    Wrong kernel after upgrade --- old kernel still installed?

  27. 27

    Device not managed after upgrade to ubuntu 16

  28. 28

    Vagrant unable to mount SMB after upgrade to 1.7.4

  29. 29

    Unable to start VMWare Workstation after upgrade to 13.04

HotTag

Archive