需要帮助在ubuntu 12.04上安装VirtualBox

我在chroot上运行,日志文件显示为:

Uninstalling modules from DKMS Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/5.0.2/source -> /usr/src/vboxhost-5.0.2 DKMS: add completed. Failed to install using DKMS, attempting to install without Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop. 

请帮忙。

安装内核头文件。

启动下面的命令进行检查

 apt-cache policy linux-generic | grep Installed 
  • 如果您看到Installed:背后的版本Installed:像这样,带有版本号

     Installed: 3.19.0.26.25 

    然后开始

     sudo apt-get install linux-headers-generic 
  • 如果你看到

     Installed: (none) 

    开始

     sudo apt-get install kernel-headers-$(uname -r)