1. 程式人生 > >VM tools安裝錯誤The path "" is not a valid path to the xx generic kernel headers.

VM tools安裝錯誤The path "" is not a valid path to the xx generic kernel headers.

最新 distrib vm tools ati ole search war 簡單的 lib

VMWARE TOOLS安裝提示THE PATH IS NOT A VALID PATH TO THE GENERIC KERNEL HEADERS
I solved this problem, I guess.
Perhaps the version.h does not exists at 3.7.0-7-generic/include/linux directory.

First, make sure install build-essiontial and linux-headers.

$ sudo apt-get install build-essential linux-headers-$(uname -r)

And then,

sudo -i
cd /lib/modules/3.7.0-7-generic/build/include
cp ./generated/uapi/linux/version.h linux/version.h

and then,


$ sudo ./vmware-install.pl

...
Enter the path to the kernel header files for the 3.7.0-7-generic kernel? /lib/modules/3.7.0-7-generic/build/include
...
Done!


This may helpful to you...

======================================================================

Ubuntu內核升級後,和主機間的共享可能會失效,這時就須要又一次安裝vmware tools了

1. 又一次安裝VMWare Tools
解壓vmware tools,得到vmware-tools-distrib文件夾,用root權限運行其下的vmware-install.pl文件

tar -xzvf VMwareTolls-9.2.3-1031360.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl

安裝分為三個步驟:

卸載舊版本號
安裝新版本號
配置新版本號(以後也能夠手動運行/usr/bin/vmware-config-tools.pl)


2. 配置中遇到的問題
在第3步中。可能會出現下面問題:

Searching for a valid kernel header path...
The path "" is not a valid path to the 3.5.0-23-generic kernel headers.
Would you like to change it? [yes]

須要安裝linux-headers-3.5.0-23-generic包。詳細版本號可能不同,請自行對比(uname -r)。

sudo apt-get install linux-headers-3.5.0-23-generic

也能夠使用例如以下的通用命令

sudo apt-get install linux-headers-`uname -r`

然後把文件夾更改為有效文件夾

Enter the path to the kernel header files for the 3.5.0-23-generic kernel?


/usr/src/linux-headers-3.5.0-23-generic/include

The path "/usr/src/linux-headers-3.5.0-23-generic/include" appears to be a
valid path to the 3.5.0-23-generic kernel headers.
Would you like to change it?

[no]

其它地方難度不大,vmware tools安裝完畢。

然後就能夠用/mnt/hgfs/中訪問共享文件了。

======================================================================

Ubuntu 10.10 在安裝vmware tools的時候眼下會碰到幾個問題:

Console代碼:
1.What is the location of the directory of C header files that match your running
kernel?

[/usr/src/linux/include] <直接按 Enter>
2.The path "/usr/src/linux/include" is not an existing directory.
What is the location of the directory of C header files that match your running
kernel?

[/usr/src/linux/include] <直接按 Enter>

The path "/usr/src/linux/include" is not an existing directory.
由於 Kernel 版本號是 APT 抓下來的最新版,所以會須要輸入 “/usr/src/linux-headers-2.6.35-22-generic/include “

要註意的是,VMWare Tools 安裝時會詢問眼下系統使用的 Kernel header,所以假設 /usr/src 下有多個 Kernel header 文件夾,最好先運行 “uname -r“ 指令,確認應該使用那個本版。

另外能夠不直接使用 “/usr/src/linux-headers-2.6.35-22-generic/include” ,先 “sudo ln -s /usr/src/linux /usr/src/linux-headers-2.6.35-22-generic/include”

Console代碼:
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.35-22-generic/include
按回車以後。還是報錯說。指定的Kernel headers和當前系統使用的版本號不匹配。

Console代碼:
The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.35-22-generic). Even if the module were to
compile successfully, it would not load into the running kernel.
但事實並非不匹配,而是 Kernel 中有一個變量 UTS_RELEASE 的不存在了。

曾經這個定義放在 /usr/src/linux-headers-2.6.35-22-generic/include/linux/version.h 。而如今已經移到了/usr/src/linux-headers-2.6.35-22-generic/include/generated/utsrelease.h。所以簡單的方法。我們僅僅須要在version.h中加入 #define UTS_RELEASE "2.6.35-22-generic" (詳細值使用 “uname -r“ 查看)

接下來繼續,又會有新的錯誤提示!! -_-|| 找不到 autoconf.h 原因是由於 autoconf.h 不再VMware tools 安裝程序預設的尋址文件夾中。

Console代碼:
The path "/usr/src/linux-headers-2.6.35-22-generic/include" is a kernel header
file directory, but it does not contain the file "linux/autoconf.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.
能夠簡單的把它鏈接過來:

cd /usr/src/linux-headers-2.6.35-22-generic/include/linux

sudo ln -s ../generated/autoconf.h ./

然後應該能順利完畢安裝了。

VM tools安裝錯誤The path "" is not a valid path to the xx generic kernel headers.