ubuntu下安装vbox无法启动问题解决

ubuntu12下安装vbox无法启动问题

启动虚拟机 报VirtualBox error: 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.

执行/etc/init.d/vboxdrv setup 无任何反应,重新安装vbox 和dkms 均无效,网上找了好的方法也不能解决。

最后还是看多了自己解决了

方法如下:

1、将当前用户加如vboxusers用户组

sudo usermod -G vboxusers -a user
2、执行
sudo /etc/init.d/vboxdrv setup 有反应了,如下

$ sudo /etc/init.d/vboxdrv setup
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.5.0-18-generic cannot be found.
Please install the linux-headers-3.5.0-18-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located

* Failed, trying without DKMS
* Recompiling VirtualBox kernel modules
* Look at /var/log/vbox-install.log to find out what went wrong

根据提示查看了日志,需要安装linux-headers-3.5.0-18-generic 源码包,于是执行安装

:~$ sudo apt-get update

sudo apt-get install linux-headers-generic
然后重新执行sudo /etc/init.d/vboxdrv setup 安装成功,vbox创建到虚拟机可以启动了

虚拟机中ubuntu无法安装vbox增强包,查看/var/log 目录下日志发现也是无内核源码,执行上面命令安装内核源码后可解决安装问题

参考http://forums.bodhilinux.com/index.php?/topic/3260-solved-cant-install-guest-additions-in-virtualbox/

/
tmp
/
vbox
.
0
/
Makefile
.
include
.
header
:
94
:
 
***
 
Error
:
 unable to find the sources of your current 
Linux
 kernel
.
 
Specify
 KERN_DIR
=<
directory
>
 
and
 run 
Make
 again
.
  
Stop
.


Creating
 user 
for
 the 
Guest
 
Additions
.


$ sudo apt
-
get
 install build
-
essential linux
-
headers
-
$
(
uname 
-
r
)

猜你喜欢

转载自demon3780.iteye.com/blog/1738613
今日推荐