VMtools安裝錯誤Thepath""isnotavalidpathtothexxgenerickernelheaders.

來源:互聯網
上載者:User

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 ./

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.