在安装VirtualBox自动增强功能的时候安装失败。
查看日志文件,错误信息:
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again。
这时可以安装:
[root@localhost ~]# yum install gcc
[root@localhost ~]# yum install gcc kernel-devel kernel-headers
重启,安装一般就能成功,如果还是安装失败的话:
[root@localhost ~]# yum update kernel
重启,这时安装成功