ubuntu 14.04安装virtualbox 报错:
VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.
网上大部分的文章都是让大家去升级内核,但是我们修改了内核,可能导致开发环境出问题,比如android的编译。
所以,我们应该安装正确的版本才对。
第一步:不要急着安装。首先要找到一个适配你的linux内核的版本,比如我的 ubuntu版本是Ubuntu 14.04.1,使用uname -r 查看内核版本:
uname -r
4.4.0-148-generic
virtualbox 的版本4.3.40是可以运行在这个内核版本上的。(ubuntu 14.04 不带尾缀的版本,该版本不适用,需要使用5.2的版本)
第二步:修改bios选项,将Intel Virtualization Technology 的选项 更改为Enable。把所有Virtualization相关的选项都改为支持就对了。
另外还要修改bios选项中的Secure Boot ,改为disable, 否则会报:
VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.
第三步:将当前用户加入vboxusers用户组
sudo usermod -G vboxusers -a