virtualbox 的“vagrant up”问题

virtualbox 的“vagrant up”问题
$ vagrant up

The provider 'virtualbox' that was requested to back the machine
'scdev' 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.

然后我尝试调查,似乎我已经有了这些包:

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

 You will not be able to start VMs until this problem is fixed.
5.0.24_Ubuntur108355

$ sudo apt install linux-headers-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-generic is already the newest version (4.4.0.59.62).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install virtualbox-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
virtualbox-dkms is already the newest version (5.0.24-dfsg-0ubuntu1.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

答案1

这只是几个月前的事,但我偶尔会遇到这个问题,我想发布我的流浪汉这样做的解决方案/原因。

对我来说,这个问题通常是由于 Vagrant 意外结束(即我的笔记本电脑电池没电了)引起的。以下是一些对我有用的方法:

  1. 通常情况下,amodprobe vboxdrv就可以解决问题。这会重新应用内核模块,一切正常。
  2. 或者,重新配置包dpkg-reconfigure virtualbox-*
  3. 最糟糕的情况是,把一切都毁掉,然后再试一次sudo apt-get remove --purge virtualbox-dkms linux-headers-generic; #etc

答案2

我也有类似的问题。只要应用了某些核心内核更新,我的虚拟机就不会开始抱怨(红色):

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.

我尝试过重新配置。我尝试过完全删除并重新安装 virtualbox 和 dkms 支持。我可以通过随时重新安装 dkms 来修复它,但下次内核更新时,它会再次弹出红色,我必须重新进行一遍。

答案3

按照以下步骤操作即可解决我的问题

  1. 启动您的设备,然后禁用安全启动
  2. 然后运行

    sudo apt-get install virtualbox
    

    在你的终端

...我认为这可以解决你的问题

答案4

尝试启用虚拟化并禁用安全启动。这可以通过输入计算机的启动设置来完成。另外,如果系统要求,请安装 linux-headers-generic 和 virtualbox-dkms。

相关内容