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

Q. I’ve CentOS 5 installed under vmware. When I run following command:
vmware-config-tools.pl
or
vmware-config.pl

ADVERTISEMENTS

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.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
12 comments… add one
  • ebin Aug 23, 2007 @ 15:08

    how to updte software in redhat enterprise5

  • ackros Dec 13, 2007 @ 17:25

    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?

  • Andrew Nov 19, 2009 @ 21:25

    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

  • Eric Jan 27, 2010 @ 16:41

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

  • Nevin Feb 8, 2012 @ 15:29

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

  • Matthew Jun 25, 2012 @ 4:25

    Thanks for this tip! It worked like charm.

  • Zommie Sep 27, 2012 @ 14:44

    Thanks Andrew,

    You keep helping people with that answer! :)

  • Martin Jul 26, 2013 @ 4:27

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

  • Xin Jan 15, 2014 @ 7:47

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

  • Flo Jul 29, 2014 @ 8:13

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

  • Matteo Dec 16, 2015 @ 12:15

    Also with centos 6.7 and 6 year after you trick Andrew work! Thanks a lot!

  • Stiv Ostenberg Feb 14, 2017 @ 18:54

    Even this fix did not appear to work for me on Centos 7. Finally, I tried the command “vmware-install.pl -default -f” and it installed. Not sure why that made a difference, wasnt expecting it to.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.