在 GitHub Codespaces 中,使用 VirtualBox 运行 vagrant up 时出现“VirtualBox 抱怨安装不完整”

在 GitHub Codespaces 中,使用 VirtualBox 运行 vagrant up 时出现“VirtualBox 抱怨安装不完整”

我正在尝试启动一个 vagrant VM 来用作工作环境。

当我尝试启动机器时,它不断抛出错误:

The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.

然后出现这个错误

WARNING: The character device /dev/vboxdrv does not exist.
         Please install the virtualbox-dkms package and the appropriate
         headers, most likely linux-headers-azure.

         You will not be able to start VMs until this problem is fixed.
6.1.16_Ubuntur140961

我也尝试过运行sudo apt-get install linux-headers-azure但仍然出现同样的错误。

此外,当我运行modprobe vboxdrv它时会引发以下错误: modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.4.0-1051-azure

这是 Codespace 设置:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

有什么建议么?

相关内容