关于VMware6.5下Ubuntu9.04安装VMware tools的一些问题总结

 为了在VMware下Ubuntu操作使用更方便,必须安装VMware tools。但是在安装过程中经常出现一些不兼容的问题,一下是我遇到的一些问题以及解决方法:

1、共享文件夹失败:

     参考自http://www.linuxidc.com/Linux/2009-05/19988.htm  将vmhgfs内的page.c用网页中的附件覆盖即可,应该是VMware tools与Ubuntu9.04兼容问题

2、鼠标自由进出客户系统问题

    输入sudo apt-get install xserver-xorg-input-vmmouse即可

3、gcc版本识别问题

    Your compiler "/usr/bin/gcc " version "gcc -Version 4.3.2 (Ubuntu 4.3.2-1ubuntu12) " is not supported by this version of VMware Tools .

    其实是VMware-config-tools.pl里面的一个小bug,它在判断系统的gcc版本时,使用了“gcc -v”命令,而不是以前的“gcc -dumpversion”,因为Suse不支持后者。我们在Ubuntu下看看两个命令的结果就明白了:

用“-v”返回的是一大串解释,而用“-dumpversion”,则简单返回“4.2.4”,VMware-config-tools.pl文件 如果把前者拿去用来比较版本的话,自然就会出错了,所以把VMware-config-tools.pl里面几处用到“-v”的地方改为 “-dumpversion”即可。估计是最近升级之后,Ubuntu的gcc的输出有了点变化而导致了这个问题。

   解决方法:具体操作步骤为在安装好VMware Tools 后,运行vmware -config-tools .pl前,用vi或文本编辑器打开/usr/bin/vmware -config-tools .pl,
把3961行的" -v 2>&1 | tail -1"改为' -dumpversion ',再把下面3969行的/^gcc version (egcs-)?(/d+/./d+(/./d+)*)/改为
/^(egcs-)?(/d+(/./d+)*)/,保存,运行vmware -config-tools .pl,下面应该就能成功了啊。
反正在我的Fedora 10中原来也是这个问题,后来一改就成功了,你们也在Ubuntu试试看吧。

 

 

 

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

 

 

这几天在vmware6.5中装了一个ubuntu10.10玩了一下,过程如下:

进入解压后的vmwaretools目录
             $ cd /tmp/vmware-tools-distrib
执行安装命令 $ sudo ./vmware-install.pl

接下来一路输入回车

中间出现了问题:
What is the location of the directory of C header files that match your runningkernel? [/usr/src/linux/include]

按回车后:
The path "/usr/src/linux/include" is not an existing directory.
输入 /usr/src/linux-headers-2.6.35-22-generic/include

按回车后还是报错
说**和当前运行的kernel版本不匹配。

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 tocompile successfully, it would not load into the running kernel. 

我们只需要在version.h中添加 "#define UTS_RELEASE "2.6.35-22-generic"
(kernel版本使用 “uname -r“ 查看)

按回车继续,又会有新的错误提示:
The path "/usr/src/linux-headers-2.6.35-22-generic/include" is a kernel headerfile directory, but it does not contain the file "linux/autoconf.h" asexpected. 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, youmay want to rebuild your ke

打开一个新的终端输入:
$ cd /usr/src/linux-headers-2.6.35-22-generic/include    <enter>  进入linux目录的上级目录
$ sudo chmod a+rw linux                                           把linux目录改为可读写


把     /usr/src/linux-headers-2.6.35-22-generic/include/generated/autoconf.h
拷贝到 /usr/src/linux-headers-2.6.35-22-generic/include/linux下


然后就能顺利完成安装了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值