empty path for kernel headers – configuration of VMware Tools on Debian

安装Debian虚拟机的VMware Tools出错”empty path for linux kernel headers“,VMware官网的一个帖子提出了解决办法:

According to many discussion mainly on Fedora fora (but also this forum)

about empty path for linux kernel headers during configuration

VMware Tools, it fix the problem:

install required packages kernel-headers, kernel-devel, make, gcc, binutils,

kernel-PAE, kernel-PAE-devel


install or just configure via corresponding scripts

adding this line (what I found somewhere) to version.h:

echo "#define UTS_RELEASE \"$(uname -r)\"" >> /usr/src/kernels/$(uname -r)/include/linux/version.h

could be ommited

原文: http://communities.vmware.com/thread/315994



If I remember correctly, it’s a vmware issue. There’s a line you will have to change and I can’t find the link. This is assuming your kernel-devel package matches your running kernel.

If kernel and kernel-devel match, and you have the basic tools, gcc, make, and so on, then it’s the more obscure problem.

Extract the tarball from the mounted vmware tools and edit vmware-install.pl, which I think gets placed in /usr/bin. Look for he line that’s something like this

if (-e $answer . '/generated/utsrelease.h') {
      $uts_headers .= "#include <./generated/utsrelease.h> \n";

Around line 2006

The line will be slightly different, change it to read what I have above.

For reference


Now when running vmware-config.pl the correct path is found and you no longer have to edit version.h and/or to look for the correct path. Thank you Mattias!