Fedora 安装virtualbox /etc/init.d/vboxdrv setup 内核错误
Fedora 14下安装virtualbox ,提示/etc/init.d/vboxdrv setup,运行后还是错误,提示/2.6.32.21-166.fc12.i686.PAE找不到,郁闷了好几天,终于google.找到了方法
解决方法好下,不同2.6.32.21-166.fc12.i686,请先对应,不同的会不一样
Makefile:152: *** Error: unable to find the sources of your current Linux kernel.Specify KERN_DIR=<directory> and run Make again. Stop.
yum search kernel
yum install kernel.i686
yum install kernel.devel.i686
yum install kernel-PAE.i686
yum install kernel-headers.i686
使用安装内核源码后,KERN_DIR 的位置在:/usr/src/kernels/2.6.32.21-166.fc12.i686
根据提示重新编译:
KERN_DIR=/usr/src/kernels/2.6.32.21-166.fc12.i686 /etc/init.d/vboxdrv setup
然后提示:
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [FAILED ]
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
然后dmesg查看错误信息:
vboxdrv: version magic '2.6.32.21-166.fc12.i686 SMP mod_unload 686 ' should be '2.6.32.21-166.fc12.i686.PAE SMP mod_unload 686 '
vboxdrv: version magic '2.6.32.21-166.fc12.i686 SMP mod_unload 686 ' should be '2.6.32.21-166.fc12.i686.PAE SMP mod_unload 686 '
应该是PAE
安装PAE源码
yum install kernel-PAE-devel.i686
KERN_DIR=/usr/src/kernels/2.6.32.21-166.fc12.i686.PAE /etc/init.d/vboxdrv setup
期间了解下PAE
http://blog.csdn.net/taizhoufox/archive/2010/04/16/5491333.aspx
好处是能支持64G内存,提示但对cpu有要求。。
不用担心。。
Stopping VirtualBox kernel module [ OK ]
Removing old VirtualBox netadp kernel module [ OK ]
Removing old VirtualBox netflt kernel module [ OK ]
Removing old VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]