您的位置:首页 > 运维架构 > Linux

VirtualBox中安装增强工具失败

2016-12-23 00:00 417 查看
在virtualbox中安装centos6.4后,再安装增强工具失败。

** 安装报错如下 **

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.

查看错误日志:

/tmp/vbox.o/Makefile.include.header:97: ***
Error: unable to find the source of your current Linux kernel.Specify KERN_DIR=<directory> and run make again. Stop.

** 解决方法 **

yum install -y kernel-headers

yum install -y kernel-devel

yum install -y gcc*

yum install -y make

检查 uname -r 和 /usr/src/kernels/[version] 是否匹配. 不匹配则yum update令二者兼容

重启服务器,再次安装 增强功能包,ok
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息