当前位置: 首页>>技术教程>>正文


在VirtualBox中,如何解决vboxdrv安装失败?

,

问题描述

因此,我尝试使用VirtualBox创建操作系统,但出现此错误:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

因此,我做了明显的事情,运行了Vboxdrv安装程序。我运行了以下命令:

sudo service vboxdrv setup

这样做时出现错误:

stopping kernel drivers...done.

Uninstalling old virtualbox dkms kernel modules/etc/init.d/voboxdrv: 302: /etc/init.d/vboxdrv: /usr/share/virtualbox/src/vboxhost/do_dkms: not found
...done.
(Failed, trying without DKMS)
recompiling VirtualBox kernel modules...failed!
(look at /var/log/vbox-install.log to find out what went wrong.)

因此,我看了看/var/log/vbox-install.log,看看是否能找到任何东西。我收到此错误:

/etc/init.d/vboxdrv: 334: /etc/init.d/vboxdrv: /usr/share/virtualbox/src/vboxhost/build_in_tmp: not found

有什么帮助吗?谢谢。

最佳回答

终于成功了。看起来DKMS无法正常工作(?)。重新安装virtualbox-dkms后,我的VM已备份。

sudo apt-get --reinstall install virtualbox-dkms

次佳回答

我建议以下内容:

首先,请确保您具有标头和其他必需的元素来构建程序。打开一个终端窗口ctrl + alt + t

sudo apt-get install build-essential libssl-dev linux-headers-`uname -r`

其次,安装dkms模块,以便在内核更新后不会遇到此问题

sudo apt-get install dkms

最后,按照第一个错误消息的建议尝试命令

sudo -i
/etc/init.d/vboxdrv setup
exit

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/11034.html,未经允许,请勿转载。