![无法解决虚拟盒问题](https://linux22.com/image/1146120/%E6%97%A0%E6%B3%95%E8%A7%A3%E5%86%B3%E8%99%9A%E6%8B%9F%E7%9B%92%E9%97%AE%E9%A2%98.png)
我对 Ubuntu 还很陌生。过去 2-3 天我一直在使用 genymotion。今天我尝试启动它时,它显示 virtualbox 出了问题。我是从 repos 中安装的。我卸载了它,然后从 repos 重新安装,然后再次卸载,然后使用 VirtualBox 站点上的 .deb 重新安装。尝试安装 dkms,什么也没发生。尝试启动 Virtual Box 时,我收到此消息,
WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.4.0-65-generic) or it failed to load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
尝试运行 sudo /sbin/vboxconfig,我收到以下信息:
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
apt-get install linux-headers-4.4.0-65-generic
(The last command may fail if your system is not fully updated.)
apt-get install linux-headers-generic
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:
apt-get install linux-headers-4.4.0-65-generic
(The last command may fail if your system is not fully updated.)
apt-get install linux-headers-generic
There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root.
/var/log/vbox-install.log的内容是:
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again. Stop.
运行 apt-get install linux-headers-4.4.0-65-generic,我得到:
Package linux-headers-4.4.0-65-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'linux-headers-4.4.0-65-generic' has no installation candidate
答案1
当模块未加载时可能会发生此错误。即使你不使用 Arch Linux,你仍然可以阅读以下内容:https://wiki.archlinux.org/index.php/VirtualBox#Load_the_VirtualBox_kernel_modules
那么,尝试一下:
sudo modprobe vboxdrv
或重新启动计算机。