CentOS Linux install kernel headers to build vmware / 3rd party modules

by on May 6, 2007 · 10 comments· LAST UPDATED May 6, 2007

in , ,

Q. I’ve CentOS 5 installed under vmware. When I run following command:

It asks about Linux kernel headers to build custom headers.

How do I fix this problem?

A. You don’t have development package for building kernel modules to match the kernel. It is required to build 3rd party modules such as vmware or graphics card drivers.

There is a package called kernel-devel. This package provides kernel headers and makefiles sufficient to build modules against the kernel package.

Login as the root, and use yum command to install the same:
# yum install kernel-devel

Now you should able to build kernel modules.

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 10 comments… read them below or add one }

1 ebin August 23, 2007 at 3:08 pm

how to updte software in redhat enterprise5


2 ackros December 13, 2007 at 5:25 pm

i too had this and installed via yum kernel-*

when i do the vmware config tools
this path is auto shown /lib/modules/2/6/23.1-42.fc8/build/include

yet it fails should i be changing this and if so what does the folder look likr or is called?


3 Andrew November 19, 2009 at 9:25 pm

Old topic, but early hit on google that almost worked for me except I hit the same problem as ackros. I also did:
cd /lib/modules/2.6.18-164.el5
sudo rm source build
sudo ln -s ../../../usr/src/kernels/2.6.18-164.el5 build
sudo ln -s build source

and it worked. I think installing kernel-devel left me with broken hard links that the above steps fixed. This was on centos5.4


4 Eric January 27, 2010 at 4:41 pm

Great post Andrew!! The install went perfectly for me with you steps.


5 Nevin February 8, 2012 at 3:29 pm

Don’t worry I don’t think that RMS is rdieang my modest blog He have more interesting things to do


6 Matthew June 25, 2012 at 4:25 am

Thanks for this tip! It worked like charm.


7 Zommie September 27, 2012 at 2:44 pm

Thanks Andrew,

You keep helping people with that answer! :)


8 Martin July 26, 2013 at 4:27 am

Your the man Andrew! Your 4 line howto did the trick. It is July 2013, but this post still help people.


9 Xin January 15, 2014 at 7:47 am

Thank you for your help. It’s help me a lot~
From China


10 Flo July 29, 2014 at 8:13 am

Thank you Andrew !
Even 5 years later, it helped me :)


Leave a Comment

Tagged as:

Previous Faq:

Next Faq: