Debian and VMware server “The path /usr/src/linux/include is a kernel header file directory, but it is not part of kernel source tree.”

Yeah a long name I know, but trying to get it stuck in Google so it will be most helpful.

I hit this snag and did a lot of trawling with little luck. Previously had no issues installing VMWare server, upgrade to Lenny, swap some hardware, decide to get it up and running and POOF! no dice!

Anyway I have solved it (huzzah!) and can finally goto bed :)

It seems that the error message is related to the lack of .config and or Makefile in the headers. So a .config or Makefile in /usr/src/linux/.

if you have installed your headers :

apt-get install linux-headers-$(uname -r)

have build-essential installed have set CC to be gcc-4.1 yet still you get grief, heres what I found.

If you look in the headers path, you will see .config and Makefile. Yet no joy!, look closer, the Makefile is a damn pesky SymLink!!! this goes for most if not all of the buggers. What you need along with the headers is:

linux-headers-2.6.26-1-common

which should reside in the same directory as your headers:

ls
linux-headers-2.6.26-1-686
linux-headers-2.6.26-1-common

The SymLinks point into files in there, for some reason (possibly my own stupidity) I didn’t have it, possibly deleted it in a fit of disk space recovery before starting the build.

Hopefully that will be of use for someone out there, if not, I am sure I will find it useful when I next cause myself grief :)

4 thoughts on “Debian and VMware server “The path /usr/src/linux/include is a kernel header file directory, but it is not part of kernel source tree.””

  1. Erm, Sorry Nigel but no, that doesn’t work. As I explained in my post, the issue was due to missing packages from the Debian kernel source which the headers specific to my kernel linked too, without those its never going to work.

    For the record tho, that symlink existed at the time I had the problem, and was the 1st thing I recreated to try and fix it.

    thanks

  2. I have been having this same problem for the last 4 days. I upgraded from Ubuntu 8.04 to 8.10 and ended up with the 2.6.27-11 kernel. I have tried all the trick and found the problem after having a look at this LinkoVitch’s comments.

    My /usr/src/linux-headers-2.6.27-11-generic symlinks all pointed to ../2.6.27-11. So I removed the linux-headers-2.6.27-11 package and re installed both linux-headers-2.6.27-11 and linux-headers-2.6.27-11-generic. Created the symlink for linux in /usr/src. It did the trick. VMware Server compiled without problems.

    Thanks LinkoVitch for pointing me in the right direction. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>