安装vmware tool时,遇What is the location of the ...(解决)

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
easeking
帖子: 11
注册时间: 2011-08-09 10:06

安装vmware tool时,遇What is the location of the ...(解决)

#1

帖子 easeking » 2011-08-15 14:46

我的系统是windows2003,vm652,安装ubuntu11.04(光盘默认安装,并且更新所有更新),现在是想安装vmware tools
加载光驱后,得到文件VMwareTools-7.8.5-156735.tar.gz,解压到home/tmp中,我在终端中进入root帐户
sudo ./vmware-install.pl
一路回车,到了以下的位置后,就卡住了,我只得按ctrl+c终止安装

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]

求助如何解决?
:em20
上次由 easeking 在 2011-08-16 9:10,总共编辑 1 次。
头像
懒蜗牛Gentoo
论坛版主
帖子: 7353
注册时间: 2007-03-02 17:36
系统: Linux Mint

Re: 安装vmware tool时,遇What is the location of the ...,求助

#2

帖子 懒蜗牛Gentoo » 2011-08-15 15:16

他在等着你按回车…………
虽然世上没有完美的东西,但这并不影响我们追求完美,因为只有偏执狂才TMD能成功。
10.04新手入门——笨兔兔讲述自己的故事
头像
wjchen
帖子: 583
注册时间: 2011-05-02 19:08
系统: ubuntu 12.04

Re: 安装vmware tool时,遇What is the location of the ...,求助

#3

帖子 wjchen » 2011-08-15 16:13

它要你指定内核源代码头文件的位置(默认的位置找不到)。
11.04的话应该是在/usr/src/linux-headers-`uname -r`/include。(其中`uname -r`是你内核版本)
easeking
帖子: 11
注册时间: 2011-08-09 10:06

Re: 安装vmware tool时,遇What is the location of the ...,求助

#4

帖子 easeking » 2011-08-15 21:37

我用以下的命令查本机的t
uname -r
2.6.38-10-generic

------------之后,我输入

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.38-10-generic/include/ ###从/usr。。。之后的,就是我输入的内容。以下是电脑自动输出的,我晕了,又不知是什么意思了。是不是这个包,不适合这个2.6.38-10这个版本?

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.38-10-generic). Even if the module were to
compile successfully, it would not load into the running kernel.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]
easeking
帖子: 11
注册时间: 2011-08-09 10:06

Re: 安装vmware tool时,遇What is the location of the ...,求助

#5

帖子 easeking » 2011-08-15 22:15

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

If the virtual printer feature is enabled, you will need to restart the CUPS
service to make use of this feature.

Enjoy,

--the VMware team
---------------
以上是我解决了卡住的步骤后一路回车后的结果。我想即然enjoy了,应是解决了。
easeking
帖子: 11
注册时间: 2011-08-09 10:06

Re: 安装vmware tool时,遇What is the location of the ...,求助

#6

帖子 easeking » 2011-08-15 22:22

根据可能是头文件的与VM 默认的路径有关,我百度
找到一答案。
一种情况是vmware的问题,其实kernel header已经安装了,只是没有正确的被识别到
解决办法如下:

-------------以下是原文
1. 运行cd /lib/modules/`uname -r`/build/include/linux
如果没有提示错误信息,ps: uname -r 查看内核版本号

2. 做两个软连接就行了,具体方法是运行下面两条命令
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h
这两条命令给vmwaretools关联了正确的内核头文件的位置

3. 再次执行./vmware-install.pl
-----------------------以下是我新一终端后的运行

zhouubuntu@zhouubuntu-virtual-machine:~$ uname -r
2.6.38-10-generic
zhouubuntu@zhouubuntu-virtual-machine:~$ cd /lib/modules/`uname -r`/build/include/linux
zhouubuntu@zhouubuntu-virtual-machine:/lib/modules/2.6.38-10-generic/build/include/linux$ ln -s ../generated/autoconf.h
ln: 创建符号链接 "./autoconf.h": 权限不够
zhouubuntu@zhouubuntu-virtual-machine:/lib/modules/2.6.38-10-generic/build/include/linux$ su root
密码:
root@zhouubuntu-virtual-machine:/lib/modules/2.6.38-10-generic/build/include/linux# ln -s ../generated/autoconf.h
root@zhouubuntu-virtual-machine:/lib/modules/2.6.38-10-generic/build/include/linux# ln -s ../generated/utsrelease.h

----------------之后,我回到运行刚才运行安装VM的终端,Enjoy.
easeking
帖子: 11
注册时间: 2011-08-09 10:06

Re: 安装vmware tool时,遇What is the location of the ...,求助

#7

帖子 easeking » 2011-08-15 23:26

用以上的方法安装vmtool后,运行vmtoolbox,还是会报错。

我试着在没有安装过vmtool的电脑上运行vmware-toolbox
zhou@zhou-virtual-machine:~$ vmware-toolbox
程序“vmware-toolbox”尚未安装。 您可以使用以下命令安装:
sudo apt-get install open-vm-toolbox
系统建议我如上apt
------------------

apt-get后,运行程序。
正常。

原来,事情可以变得这么简单。
回复