安装 virtualbox additions 备忘 转

本文详细记录了在Fedora KDE系统中安装VirtualBox Guest Additions遇到的问题及解决方案,包括安装失败的原因分析、必要的软件包安装、内核源码配置以及重启后的验证步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#sudo sh ./VBoxLinuxAdditions.run 

提示失败 

Building the VirtualBox Guest Additions kernel modules [FAILED] 
Your system does not seem to be set up to build kernel modules. 
Look at /var/log/vboxadd-install.log to find out what went wrong. 
Once you have corrected it, you can run /etc/init.d/vboxadd setup to build them. 

#gedit /var/log/vboxadd-install.log 内容 

Makefile:23: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.. Stop. 
Creating user for the Guest Additions. 
Creating udev rule for the Guest Additions kernel module. 

安装GCC 

#yum install gcc 

# yum install gcc kernel-devel kernel-headers 

重启。 

再次安装VBoxLinuxAdditions,OK。

============================================

Fedora KDE 真的很漂亮啊,爱不释手,但是安装VirtualBox增强包比Ubuntu、Solaris难得多。

安装中出错:
Building the VirtualBox Guest Additions kernel modules [FAILED] (Your system does not seem to be set up to build kernel modules. Look at /var/log/vboxadd-install.log to find out what went wrong)
根据提示:cat /var/log/vboxadd-install.log 看到:
Makefile:23: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.
然后如下处理:
su
password
# yum groupinstall "Development Tools"
# yum groupinstall "Development Libraries"
# yum install unifdef rpm-build
# yum install dkms
export KERN_DIR=/usr/src/kernels/2.6.18-164.15.1.el5-i686/
sh ./VBoxLinuxAdditions-x86.run

最后检查kernel的版本是否一致:rmp -qa |grep kernel
如果不一致,将kernel、kernel-headers、kernel-devel升级到同一版本,重启电脑新版本运行!
就OK啦!

转载于:https://my.oschina.net/flywuya/blog/467887

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值