Virtual Box升级后,内核源丢失

Hus*_*sni 4 virtualbox 12.10

我确实将 VirtualBox 从 4.1 升级到 4.2

每当我想加载我的 Win XP VDI 时,它都会给我以下错误:

未安装内核驱动程序 (rc=-1908)

VirtualBox Linux 内核驱动程序 ( vboxdrv) 未加载或/dev/vboxdrv. 请通过执行重新安装内核模块

/etc/init.d/vboxdrv setup
Run Code Online (Sandbox Code Playgroud)

作为根。如果它在您的发行版中可用,您应该首先安装 DKMS 包。该软件包会跟踪 Linux 内核更改并在必要时重新编译 vboxdrv 内核模块。

我按照建议的步骤重新安装内核模块,日志文件如下:

Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Run Code Online (Sandbox Code Playgroud)

我仍然无法重新运行我的 win 虚拟 XP vdi 文件。

有人有任何线索吗?

Jav*_*era 10

看起来你没有安装内核头文件,dkms 需要安装 Virtual Box 内核驱动器,安装然后运行:

sudo apt-get install linux-headers-`uname -r`
Run Code Online (Sandbox Code Playgroud)

然后,

/etc/init.d/vboxdrv setup
Run Code Online (Sandbox Code Playgroud)

应该管用。