Ask Your Question

path to kernel header

asked 2012-03-10 05:30:50 +0000

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 delete

8 Answers

Sort by ยป oldest newest most voted

answered 2012-05-18 18:04:38 +0000

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 publish link more

answered 2012-03-10 06:18:00 +0000

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 publish link more


thanks for the quick response! Unfortunately, that doesn't seem to work.

tmurph1810 ( 2012-03-10 18:57:59 +0000 )edit

More looking around on Google led me to rpm -qa; from this it doesn't look like I have the correct version of the kernel headers installed:

[root@Fedora001 ~]# rpm -qa kernel* kernel-headers-3.2.9-1.fc16.x8664 kernel-3.1.0-7.fc16.x8664 kernel-devel-3.2.9-1.fc16.x86_64 [root@Fedora001 ~]#

It looks like my program is looking for version 3.1.0-7 and I have version 3.2.9-1 installed. Do you know how I can get the older version?

tmurph1810 ( 2012-03-10 19:04:20 +0000 )edit

answered 2012-03-10 19:20:26 +0000

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 publish link more

answered 2013-06-06 19:23:50 +0000

Khorem gravatar image

updated 2013-06-06 19:25:59 +0000

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 ./vmware-install.pl
sudo reboot
edit flag offensive delete publish link more

answered 2013-03-22 08:13:38 +0000

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 publish link more

answered 2013-05-02 15:17:27 +0000

eacosta gravatar image

updated 2013-05-02 15:18:31 +0000


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 publish link more

answered 2013-05-02 17:09:34 +0000

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 publish link more


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

Vicary ( 2013-07-07 20:47:23 +0000 )edit

answered 2013-12-24 16:16:05 +0000

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 publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question tools



Asked: 2012-03-10 05:30:50 +0000

Seen: 69,678 times

Last updated: Dec 24 '13