VirtualBox安装Linux增强插件失败的解决办法

我是在windows下安装的VirtualBox(简称Vbox),并且顺利的在Vbox上安装了fedora(Linux)。因为在没有安装增强插件时,虚拟机的分辨率是无法调整的,很难看。所以我就在Vbox点击了那个安装增强插件的选项。但是总是安装到一半失败。

失败现象:

在按下那个选项的时候,虚拟机中的Linux会挂载一个光驱,然后我们可以从光驱中找到适合的安装脚本,然后执行那个脚本安装。注意要使用sudo,还有看准脚本,虽然不符合的话脚本也执行不了。

如果就这么执行能成功,就没必要写这个了。

vbox增强插件安装失败

 

失败原因:

1===========================
2Please install the build and header files for your current Linux kernel.
3The current kernel version is 2.6.31.5-127.fc12.i686
4Please install the GNU compiler.
5Problems were found which would prevent the Guest Additions from installing.
6Please correct these problems and try again.
7 
8============================

我们可以在这个输出中看到,有gcc,build的字样。这说明安装中有使用gcc进行编译。

通常情况,编译失败都是因为所需的开发包未安装

如何解决:

知道原因,那就好办了,没有包,安装呗。

我们需要安装这三个包:  gcc  kernel-devel kernel-header

yum走起就行。

1 sudo yum install gcc  kernel-devel kernel-header

有的时候,并不是gcc没安装,而是g++没安装,g++编译的是c++,属于gcc扩展。要这么安装:

1 sudo yum install gcc-c++

 还有问题:

通常情况,你已经可以安装扩展插件了。但是还有一些人会提示失败。

1============================
2 Please install the build and header files for your current Linux kernel.
3The current kernel version is 2.6.31.5-127.fc12.i686
4 Problems were found which would prevent the Guest Additions from installing.
5Please correct these problems and try again.
6=============================

这个错误的原因是几个软件包的版本高于内核的版本,所以我们需要升级内核

1 sudo yum update

这样就没有问题了。

如果还有问题,请留言讨论。

 

 

 

 

转载请注明:旅途@KryptosX » VirtualBox安装Linux增强插件失败的解决办法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值