CentOS 6.3安裝VirtualBox4自動增強功能功能的時候提示:
building the main Guest Additions module FAILED
unable to find the sources of your current Linux kernel. Specify KERN_DIR-<directory> and run Make again
這個時候需要檢測gcc make kernel-level kernel-header 等文件是否安裝。具體使用如下命令:
rpm –qa|grep gcc
沒有的話,需要安裝,需要如下命令:
yum install gcc
最後需要查看kernel的版本是否一致,使用下面的命令查看:
rpm –qa|grep kernel |sort
不一致的話,需要更新kernel,使用如下命令:
yum update kernel
完成後再安裝增強工具就OK了。
相關鏈接:在CentOS 6中安裝VirtualBox的增強功能並分配數據空間 http://www.linuxidc.com/Linux/2012-02/55428.htm
更多CentOS相關信息見CentOS 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=14