我无法在 Debian11 上安装 virtualbox - Windows 用户

我无法在 Debian11 上安装 virtualbox - Windows 用户

我是 Windows 用户,我已经通过 Windows 应用商店安装了 Debian11。

我在 Debian11 上安装 VirtualBox 时遇到了困难,但失败了。

我从这里下载了 VirtualBox 6.1(.28):适用于 Debian11 的 VirtualBox 6.1我使用以下命令安装它:

sudo dpkg -i virtualbox-6.1_6.1.28-147628~Debian~bullseye_amd64.deb

收到这些消息:

    Selecting previously unselected package virtualbox-6.1.
(Reading database ... 79878 files and directories currently installed.)
Preparing to unpack virtualbox-6.1_6.1.28-147628~Debian~bullseye_amd64.deb ...
Unpacking virtualbox-6.1 (6.1.28-147628~Debian~bullseye) ...
Setting up virtualbox-6.1 (6.1.28-147628~Debian~bullseye) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (2.0-1) ...

之后似乎 VirtualBox 已经安装好了,但我无法使用 VirtualBox 创建 docker-machine(我需要 VirtualBox 的原因),事实上如果我在 bash 上使用这个命令:

docker-machine create -d virtualbox temp.sysadmin.local

我有:

    Running pre-create checks...
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING: The vboxdrv kernel module is not loaded. Either there is no module\\n         available for the current kernel (4.4.0-19041-Microsoft) or it failed to\\n         load. Please recompile the kernel module and install it by\\n\\n           sudo /sbin/vboxconfig\\n\\n         You will not be able to start VMs until this problem is fixed.\\n6.1.28r147628\". Please upgrade at https://www.virtualbox.org"

提前感谢大家的任何提示。

答案1

您需要安装内核头并禁用安全启动。

sudo apt install linux-headers-$(uname -r)
/sbin/vboxconfig

相关内容