在服务器上运行 VirtualBox

在服务器上运行 VirtualBox

我正在尝试在服务器上设置 VirtualBox,当我尝试启动 VBox 服务时收到此响应消息:

Mar 24 20:55:49 main vboxdrv.sh[4200]: vboxdrv.sh: Starting VirtualBox services.
Mar 24 20:55:49 main vboxdrv.sh[4242]: Starting VirtualBox services.
Mar 24 20:55:49 main vboxdrv.sh[4200]: vboxdrv.sh: Building VirtualBox kernel modules.
Mar 24 20:55:49 main vboxdrv.sh[4247]: Building VirtualBox kernel modules.
Mar 24 20:55:49 main vboxdrv.sh[4200]: This system is currently not set up to build kernel modules.
Mar 24 20:55:49 main vboxdrv.sh[4200]: Please install the Linux kernel "header" files matching the current kernel
Mar 24 20:55:49 main vboxdrv.sh[4200]: for adding new hardware support to the system.
Mar 24 20:55:49 main systemd[1]: vboxdrv.service: Control process exited, code=exited status=1
Mar 24 20:55:49 main systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
Mar 24 20:55:49 main systemd[1]: Failed to start VirtualBox Linux kernel module.

它要求我“请安装与当前内核匹配的 Linux 内核“头”文件”,但我不确定应该安装什么

答案1

在 Debian 中,您应该寻找名为“linux-headers-$(something)”的软件包,其中 $(something) 是内核版本和构建。在其他发行版(如 Ubuntu)中,这可能会有所不同(我认为它被称为“linux-generic”)。

答案2

我按照 GitHub 上 Scaleway 的指南修复了这个问题。

https://github.com/scaleway/kernel-tools

相关内容