4.16.3之后无法升级内核


11

我每次在台式机和笔记本电脑上都在具有16.6.3内核的Ubuntu 16.04上运行时,每次我尝试使用UKUU升级到较新的内核时,软件包的配置都会失败,并返回此错误(例如,安装4.16.6) :

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

唯一的解决方案是将其删除,我该如何解决?


1
4.16.4有一个错误。与4.14.36相同。
WinEunuuchs2Unix

所以我们应该等待工作释放吗?
Fabi0_Z '18

是的,但是您无法添加其他任何程序,除非apt install -f已修复。
WinEunuuchs2Unix

1
它也不允许您将其删除。下班后我会发布答案。
WinEunuuchs2Unix

Answers:


10

2018年10月28日更新

对于nVidia,bbswitch和虚拟盒编译的dkms支持,请使用:

sudo apt install libelf-dev

为了避免较新的linux-header安装错误,请下载:libssl1.1

下载所需的较新的内核,您~/Downloads应如下所示:

$ 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

现在您应该能够成功安装:

sudo dpkg -i *.deb

原始答案

内核4.14.xx4.16.xx并且4.17.rc(xx)都有着相同的错误在这最后一周; 2018年4月24日至30日。

我只是想4.14.38今晚它表现出同样的错误,4.14.364.14.37作为记录这bug报告

就我而言,今晚的错误是:

$ 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

要修复我尝试的错误,sudo apt install -f但无法解决,并导致“崩溃报告”:

内核4.14.38 crash.png

使用sudo rm-kernels4.14.38尽可能地删除了:

删除4.14.38内核

这次仅成功删除了标题:

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)

现在,让我们看一下剩下的内容:

$ 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]

让我们尝试将其删除:

$ 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)

编辑文件/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 ...)

在第一行下方#!/bin/sh插入新行:

exit 0

保存文件并重新运行失败的命令:

$ 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

仔细检查一切正常:

$ 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.

7

使用ukuu安装v4.16.3之后的内核需要执行以下步骤

  1. https://packages.ubuntu.com/bionic/amd64/libssl1.1/download安装libssl1.1
  2. 为内核安装匹配的linux-modules deb

例如,对于4.16.7内核,请从以下位置获取linux-module deb

您可以在-> http://kernel.ubuntu.com/~kernel-ppa/mainline/中找到您的内核。


我不得不从今天的仿生安装libssl1.1,以巧妙地将内核从v4.14.37升级到v4.14.41。
何塞·阿尔弗雷多·罗梅罗L.

3

Ubuntu 18.04附带的内核在我的计算机(Lenovo IdeaPad S400)上存在亮度问题。解决了更新内核版本的问题。

我曾尝试过使用UKUU软件将内核更新到版本4.16.6,但是它不起作用。然后,我按照(使用终端)中的说明进行操作:如何在不进行任何发行版升级的情况下将内核更新到最新的主线版本?

对于我的计算机,我下载了以下软件包(位于http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.16.6/中):

  1. linux-headers-4.16.6-041606_4.16.6-041606.201804300418_all.deb
  2. linux-headers-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb
  3. linux-image-unsigned-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb
  4. linux-modules-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb

然后,按照上面链接的说明,我写道:

cd /path/to/folder/where/you/put/the/debs

sudo dpkg -i *.deb

效果很好。


谢谢!这非常简单,并且有所帮助。
谢尔盖·布鲁诺夫

1

我在使用最新系列的Linux内核(即K4.16.3>之后的内核)时遇到的问题是未对“ linux-image.deb”文件进行签名。缺少签名的二进制文件会导致所有问题,即无法安装,系统在任何尝试下都无法使用。

IMO唯一的解决方案是等待并耐心等待下一个主要内核版本,即K.4.17甚至K5.0,希望所需的linux-imge.deb文件将包括必要的密钥签名,从而在安装时没有任何困难。

塞特克

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.