Creating group 'vboxusers'. VM users must be member of that group!
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute
/etc/init.d/vboxdrv setup
as root.
看来是没有内核源码,所以导致无法重新编译内核。google了一下,发现需要安装kernel-devel。
安装kernel-devel
解决:yum -y install kernel-devel
但是安装之后执行
/etc/init.d/vboxdrv setup
还是报错。
查看了日志/var/log/vbox-install.log,竟然是不认识gcc命令。
yum install gcc
再次执行/etc/init.d/vboxdrv setup,成功的安装好了vbox,:-)