使用 VirtualBox 运行 vagrant 在 GitHub 代码空间中给出“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

这是代码空间设置:

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

有什么建议吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)