内核 5.4 错误:(dkms 错误返回状态)(错误退出状态)

内核 5.4 错误:(dkms 错误返回状态)(错误退出状态)

再会,

我的台式机运行的是 Ubuntu 18.04。64 位,Intel Core i3-4170 @3.70GHz,16 GiB 内存。它大约有 3 年的历史了。这是我每天使用的机器。它有 VirtualBox 6,运行两台机器。一台是 Ubuntu 18.04 服务器。它运行 Pi Hole 和其他一些功能。第二台是 Linux Mint。它运行用于视频录制的 TVHeadend 软件。我发现 TVHeadend 在自己的机器上运行效果最好。

我想从 5.0.0.36 升级到内核 5.4。我使用 ukuu 升级 Linux 内核。在过去进行的 3 次升级中,我从未遇到过使用 ukuu 软件时出现的问题。(见截图)

在此处输入图片描述

安装 5.4 内核并重启后,Virtualbox 无法打开。我收到一个弹出窗口,指示我以“root”身份运行“/sbin/vboxconfig”。我照做了(见下文)。

  root@xxx:~# /sbin/vboxconfig
  vboxdrv.sh: Stopping VirtualBox services.
  vboxdrv.sh: Starting VirtualBox services.
  vboxdrv.sh: Building VirtualBox kernel modules.
  vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went     wrong.

  There were problems setting up VirtualBox.  To re-start the set-up process,   run /sbin/vboxconfig as root.
root@xxx:~# exit
logout
  :~$ cat /var/log/vbox-setup.log
  Building the main VirtualBox module.
  Error building the module:
  make V=1 CONFIG_MODULE_SIG= -C /lib/modules/5.4.0-050400-generic/build   SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j4 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make -f ./Makefile syncconfig
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=scripts/kconfig syncconfig
  flex -oscripts/kconfig/lexer.lex.c -L scripts/kconfig/lexer.l
/bin/sh: 1: flex: not found
  bison -o scripts/kconfig/parser.tab.c --defines=scripts/kconfig/parser.tab.h -t -l scripts/kconfig/parser.y
/bin/sh: 1: bison: not found
scripts/Makefile.host:9: recipe for target 'scripts/kconfig/lexer.lex.c' failed
make[3]: *** [scripts/kconfig/lexer.lex.c] Error 127
make[3]: *** Waiting for unfinished jobs....
scripts/Makefile.host:17: recipe for target 'scripts/kconfig/parser.tab.h' failed
make[3]: *** [scripts/kconfig/parser.tab.h] Error 127
Makefile:567: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 2
Makefile:678: recipe for target 'include/config/auto.conf.cmd' failed
make[1]: *** [include/config/auto.conf.cmd] Error 2
/tmp/vbox.0/Makefile.include.footer:106: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2 

我卸载了 5.4 内核并再次尝试升级过程,结果相同。我重新启动了机器并从旧内核启动。然后我从机器中清除了 5.4 内核。我想我很快就会升级到更新的内核……

问题:如何升级到较新的内核且不出现错误?

2019 年 12 月 2 日更新/升级/自动移动

oneputtmike@:~$ apt list --upgradable
Listing... Done
libsqlite3-0/bionic-updates,bionic-security 3.22.0-1ubuntu0.2 amd64 
[upgradable from: 3.22.0-1ubuntu0.1]
linux-generic-hwe-18.04/bionic-updates 5.0.0.37.95 amd64 [upgradable 
from: 5.0.0.36.94]
linux-headers-generic/bionic-updates 4.15.0.72.74 amd64 [upgradable 
from: 4.15.0.70.72]
linux-headers-generic-hwe-18.04/bionic-updates 5.0.0.37.95 amd64 
[upgradable from: 5.0.0.36.94]
linux-image-generic-hwe-18.04/bionic-updates 5.0.0.37.95 amd64 
[upgradable from: 5.0.0.36.94]
linux-libc-dev/bionic-updates 4.15.0-72.81 amd64 [upgradable from: 
4.15.0-70.79]
linux-signed-generic-hwe-18.04/bionic-updates 5.0.0.37.95 amd64 
[upgradable from: 5.0.0.36.94]

oneputtmike@:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer 
required:
  linux-headers-4.15.0-70 linux-headers-4.15.0-70-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  linux-headers-4.15.0-72 linux-headers-4.15.0-72-generic
  linux-headers-5.0.0-37 linux-headers-5.0.0-37-generic
  linux-image-5.0.0-37-generic linux-modules-5.0.0-37-generic
  linux-modules-extra-5.0.0-37-generic
The following packages will be upgraded:
  libsqlite3-0 linux-generic-hwe-18.04 linux-headers-generic
  linux-headers-generic-hwe-18.04 linux-image-generic-hwe-18.04 linux- 
   libc-dev
      linux-signed-generic-hwe-18.04
    7 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
    Need to get 80.3 MB/80.8 MB of archives.
    After this operation, 421 MB of additional disk space will be 
used.
    Do you want to continue? [Y/n] Y

查看 upgrade/update/autoremove 输出升级/更新/自动删除输出 https://pastebin.com/GXxJDSnd

答案1

Ubuntu 不正式支持主线内核。安装它们需要您自担风险,并且不能保证所有软件都与主线内核兼容。

除非出现某些非常特殊的硬件问题,否则通常没有必要将主线内核安装到 Ubuntu。仅仅因为内核是新的就升级它并不是一个好主意。

Ubuntu 内核从最新的主线内核获取错误修复和安全更新。

答案2

因此,我意识到这个问题已经很老了,你可能已经解决了你的情况,但是对于其他任何刚刚升级到 18.04 并遇到完全相同问题的人(比如我),这里是解决方法。

基本上,您只需安装 Virtual Box 6.0,而不是尝试继续运行 5.x。

安装过程会删除旧版本,并且(至少就我而言)所有以前的虚拟机配置都应被移走。

官方下载页面在这里:https://www.virtualbox.org/wiki/Linux_Downloads

我发现这里有一些有用的附加说明:https://linuxhint.com/install_virtualbox_6_ubuntu/

第二篇文章中需要注意的一件重要事情是:

启用硬件虚拟化:在安装 VirtualBox 6.0 之前,请确保已启用硬件虚拟化。如果您使用的是 Intel 处理器,则必须从计算机的 BIOS 启用 VT-x 或 VT-d。如果您使用的是 AMD 处理器,则必须从计算机的 BIOS 启用 AMD-v。这非常重要。如果不启用硬件虚拟化,您的虚拟机性能将非常差。

相关内容