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

本文记录了在Fedora 11上安装VirtualBox过程中遇到的问题及解决方案,包括缺少内核源代码、未找到GCC编译器等问题,并最终成功安装。

[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=<directory> 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                          [  確定  ]

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值