在CentOS上安装kernel-devel

所以我试图在我的运行CentOS的VirtualBox Vm中安装Guest Additions。

我得到这个错误:

The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason. The missing package can be probably installed with yum install kernel-devel-2.6.32-279.5.2.el6.x86_64 

当我尝试运行错误中提到的yum install命令时,我得到:

 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.ox.ac.uk * epel: mirror.nl.leaseweb.net * extras: centos.serverspace.co.uk * updates: centos.serverspace.co.uk Setting up Install Process No package kernel-devel-2.6.32-279.5.2.el6.x86_64 available. Error: Nothing to do 

任何想法如何解决这个问题?

Centos发布内核更新不是不太可能。 运行yum install kernel-develyum update kernel 。 然后重新启动到新的内核。

作为特权用户尝试:

 # yum update # yum install kernel-devel # yum groupinstall "Development Tools" 

重新启动系统,安装Guest Additions CD并自动运行。

安装Guest添加后,我发现重新启动会很有帮助。

你可能会发现我的博客文章,关于我用来设置stream浪汉箱的详细过程很有帮助。 它概括了Guest Additions问题,作为包括屏幕截图在内的Vagrant设置过程的一部分。