vbox安装,启动错误:Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

[root@pohai share]# rpm -ivh VirtualBox-3.0.0_49315_fedora11-1.i586.rpm
Preparing           ########################################### [100%]
   1:VirtualBox             ########################################### [100%]

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.

[root@pohai share]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module                          [  成功  ]
Recompiling VirtualBox kernel module                       [  失敗   ]
  (Look at /var/log/vbox-install.log to find out what went wrong)
[root@pohai share]# cat /var/log/vbox-install.log
Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.  Stop.

 

 

[root@pohai share]# /etc/init.d/vboxdrv setup 启动vboxdrv 提示错误如上

 

处理方法:

先把套件調成這樣
[root@pohai share]# rpm -qa | grep kernel
kernel-devel-2.6.29.5-191.fc11.i586
kernel-firmware-2.6.29.5-191.fc11.noarch
kerneloops-0.12-5.fc11.i586
kernel-headers-2.6.29.5-191.fc11.i586
kernel-2.6.29.5-191.fc11.i586

結果在編譯一次vbox還是失敗
後來在看log發現他說找不到gcc指令
在用yum把gcc都裝上

終於可以看到成功的畫面
[root@pohai share]# /etc/init.d/vboxdrv setup    
Stopping VirtualBox kernel module                          [  確定  ]
Recompiling VirtualBox kernel module                       [  確定  ]
Starting VirtualBox kernel module                          [  確定  ]

 

 

 

 

你可能感兴趣的:(3.1,CentOS)