安装 virtualbox additions 备忘 转

#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啦!

你可能感兴趣的:(安装 virtualbox additions 备忘 转)