# [Solved] Kernel header for vmware

## Luc484

Hi all. I am trying configuring vmware but I found a problem. during the configuration this question is asked:

```

What is the location of the directory of C header files that match your running

kernel? [/usr/src/linux/include]

```

I read that it is correct to insert in this case the default directory, but I receive this message:

```

The path "/usr/src/linux-2.6.11-gentoo-r4/include" is an existing directory, but

it does not contain at least one of these directories "linux", "asm", "net" as

expected.

```

But in that dir the actually are those directories.

This is not the first time I configure vmware, and the last time it worked with that directory I think.

Do someone have any suggestion?

Thanks.Last edited by Luc484 on Mon May 16, 2005 9:33 pm; edited 1 time in total

----------

## JRV

 *Luc484 wrote:*   

> 
> 
> ```
> The path "/usr/src/linux-2.6.11-gentoo-r4/include" is an existing directory, but
> 
> ...

 

Are you sure, there is an "asm"?  :Smile:  It should be a symlink to your arch, for example

```
lrwxrwxrwx  1 root root 8 Apr  2 05:51 asm -> asm-i386/
```

Have you built the kernel? I think the symlink will automatically be set when building the configured kernel...

Greets,

  Julius

----------

## Luc484

 *JRV wrote:*   

> 
> 
> Are you sure, there is an "asm"?  It should be a symlink to your arch, for example
> 
> ```
> ...

 

OK, you were true. The asm directory was not present. But it was written "at least one" so I thought it was sufficient one  :Smile: .

 *Quote:*   

> 
> 
> Have you built the kernel? I think the symlink will automatically be set when building the configured kernel...
> 
> 

 

I think you understood my problem. In fact now, after creating the symlink, I receive this message:

```

The path "/usr/src/linux/include" is a kernel header file directory, but it does

not contain the file "linux/version.h" as expected.  This can happen if the

kernel has never been built, or if you have invoked the "make mrproper" command

in your kernel directory.  In any case, you may want to rebuild your kernel.

```

What does it mean "build the kernel"? Is it the same as compiling the kernel? I think I didn't do it. Do you know whether there is a guide that explains how to do it? I don't have any idea.

Thanks for your help.

----------

## JRV

 *Luc484 wrote:*   

> What does it mean "build the kernel"? Is it the same as compiling the kernel? I think I didn't do it. Do you know whether there is a guide that explains how to do it? I don't have any idea.

 

Building the kernel means compiling (and linking etc.) it, yes.

Well, you _must_ have built your current kernel (uname -r gives you the currently running kernel name) at _some_ point, otherwise you wouldn't _have_ a kernel  :Smile: . The exception would be if you used an already existing binary kernel from somewhere, but that is not probable...

(You probably used Genkernel (otherwise you would remember building it  :Smile:  ) to configure and build your kernel.)

1) Check that the output of "uname -r" matches the kernel that the symlink /usr/src/linux points to. If not, set the symlink to the kernel you are using:

```
$ rm /usr/src/linux

$ ln -s /usr/src/linux-`uname -r`  /usr/src/linux
```

2) Maybe the symlink is correct, but for some reason, the kernel in that dir hasn't been built. If it needs to be built, do this:

```
$ cd /usr/src/linux

$ zcat /proc/config.gz > .config

$ make
```

If the "/proc/config.gz" doesn't exist, kernel support for getting the current kernel config through the /proc interface hasn't been enabled, but it probably will be...

After that, /usr/src/linux should point to a fully built kernel that matches your current one.

Greets,

  Julius

----------

## Luc484

Great, you hit the problem. Thanks for your help and patience.

----------

## JRV

 *Luc484 wrote:*   

> Great, you hit the problem. Thanks for your help and patience.

 

Yay!  :Smile:  Have fun using VMware!

BTW: This is my 100th post  :Smile: 

Greets,

  Julius

----------

