Ask Your Question

path to kernel header

asked 2012-03-09 23:30:50 -0500

tmurph1810 gravatar image

I am a Linux newbie. Greener than green. Please don't assume I know something.

Synopsis I need help finding the path to the kernel header because that's part of an installation process for VMware tools.

Background I just installed Fedora 16 (64-bit) on a VMware Workstation VM. I can log in to the desktop and there are no obvious errors about the general installation. VMware Workstation has a helper application called VMware Tools that runs in the VM -- I installed it on my Fedora 16 VM (I think that the install succeeded because the post-install configuration script started).

The post-install script is asking me for the path to the kernel header; the message I get is: "The path '' is not a valid path to the 3.1.0-7.fc16.x86_64 kernel headers. Would you like to change it?"

I used Google and thought that it would be at /usr/include/linux or /usr/include/linux/kernel.h. Neither path works. /lib/modules/3.1.0-7.fc16.x86_64 doesn't work either.

Any help is appreciated. Thanks!

edit retag flag offensive close merge delete

10 Answers

Sort by ยป oldest newest most voted

answered 2012-05-18 13:04:38 -0500

tsally gravatar image

Here are the steps necessary to solve this problem:

  1. If this is a new install of Fedora, first update all the packages and reboot. If you install the kernel-devel package without upgrading the system, you might get a mismatch between the version of the running kernel and the version of the installed headers.

  2. Install gcc and kernel-devel packages (I do not believe kernel-headers provides everything you need). You can now find the kernel headers at /usr/src/kernel/<version>/include.

  3. Run the VMWare tools installer.

Some tips:

  • Use uname -r to see the version of your running kernel.

  • Use rpm -qa | grep kernel- to see the versions of the kernel packages you have installed.

I performed these steps on Fedora 16 and it worked for me.

edit flag offensive delete link more

answered 2012-03-10 00:18:00 -0500

Remi gravatar image

To build kernel module, the kernel-header package is required and should be enough (it provides /usr/include/linux/kernel.h).

There is also a kernel-devel package, but I don't think it is required.

edit flag offensive delete link more

answered 2012-03-10 13:20:26 -0500

tmurph1810 gravatar image


Thanks first of all to Remi, who gave me the confidence to experiment because I felt like help was out there.

It turns out that the kernel version was 3.1.0-7 and the kernel headers were version 3.2.9-1. I couldn't find an install package for the down-level kernel headers, so I updated the kernel. Now that the kernal version is the same as the kernel header version, the VMware Tools configuration program automatically found the kernel headers (which, for some reason, is in /lib/modules/3.2.9-1.fc16.x86_64/build/include).

Merci beaucoup mon ami!!

edit flag offensive delete link more

answered 2015-06-19 06:24:12 -0500

I encountered this problem with RHEL 2.6.32-504.16.2.el6.x86_64. I wanted to make an update from VMware Workstation 10.0.1 to actual 10.0.6 build-2700073

I went to the package menager and looked for a fitting "kernel-devel-xxx" packet, wich I found not being installed. -You maybe have to activate development and debugging repositories in order to get these packages listed. After installation of (in my case) "kernel-devel-2.6.32-504.16.2.el6 (x86_64)" everything worked without any further problems.

edit flag offensive delete link more

answered 2013-06-06 14:23:50 -0500

Khorem gravatar image

updated 2013-06-06 14:25:59 -0500

Fresh install of Fedora18 in vmware workstation 9.x
sudo yum install kernel-headers-`uname -r` kernel-devel-`uname -r` 
sudo yum install audit
sudo yum install gcc make binutils
sudo reboot
cd vmware-tools-distrib
sudo ./
sudo reboot
edit flag offensive delete link more

answered 2015-09-18 14:26:08 -0500

After running "sudo yum install kernel-headers-uname -r kernel-devel-uname -r" and re-running the, the auto loaded the kernel header directory, in my case it was '/lib/modules/3.10.0-229.el7.x86_64/build/include'. When it auto-loads the correct directory, just hit enter and the script finds what it is looking for.

edit flag offensive delete link more

answered 2013-12-24 10:16:05 -0500

I just installed VMWare Workstation 10 on ma F19 and I also had to install gcc and kernel-devel.

Does someone know what is the compiled module?

edit flag offensive delete link more

answered 2013-05-02 12:09:34 -0500

scottro gravatar image


One possibility is a common VMware/Fedora bug. It was fixed for F18 at one point, at least, but might be worth a shot

edit flag offensive delete link more


I am using F17 and this one actually helps me out.

Vicary gravatar imageVicary ( 2013-07-07 15:47:23 -0500 )edit

answered 2013-05-02 10:17:27 -0500

eacosta gravatar image

updated 2013-05-02 10:18:31 -0500


I've a similar problem. I'm running the debug kernel (3.8.9-200.fc18.x8664.debug) for a few days and would like to run my VM's as well. I already have the 3.8.9-200.fc18.x8664 installed so I made a copy on the /usr/src/kernels:

drwxr-xr-x 22 root root 4096 Apr 30 17:38 3.8.9-200.fc18.x86_64

drwxr-xr-x 22 root root 4096 May 2 08:01 3.8.9-200.fc18.x86_64.debug

However I still get the vmplayer complain:

image description

I already verified everything else on this thread. Any ideas?

Thank You, Erasmo.

edit flag offensive delete link more

answered 2013-03-22 03:13:38 -0500

gjgfuj gravatar image

If it is required to install an older version, just pass in the direct package name to yum like this: yum install kernel-devel-3.6.10-4.fc18.x86_64 Just use something like that, and adjust your version to fit your application

edit flag offensive delete link more

Question Tools



Asked: 2012-03-09 23:30:50 -0500

Seen: 123,583 times

Last updated: Dec 24 '13