彻底解决ubuntu8.04上无法完整安装vmware-tools的问题,完整安装后可以与WinXP共享文件夹了!

Kvm、VMware、Virtualbox、Xen、Qemu 等
chinainvent
帖子: 13
注册时间: 2007-07-26 9:26

彻底解决ubuntu8.04上无法完整安装vmware-tools的问题,完整安装后可以与WinXP共享文件夹了!

#1

帖子 chinainvent » 2008-05-30 15:01

  在论坛看了很多贴子,都没有效果,昨天下午自己读了一下虚拟机的源文件,根据编译错误的提示,加了一些代码后,终于解决了在ubuntu8.04上完整安装vmware-tools的问题,现在已经可以进行ubuntu与winxp的共享文件夹了。

一、前提条件
  本人在Window XP 专业版上安装了vmware workstation-5.5.6-80404, 然后在虚拟机上安装了ubuntu8.04 hardy。
  ps: 以前一直用vmware 5.5.3,就是因为不能完全安装vmware tools,才更新到5.5.6版本,但还好这两个版本都在100M以内,6.X版本就无法忍受了,实在太大了。

二、错误提示:
  如果直接在ubuntu8.04上安装vmware 5.5.6,在安装到vmhgfs和vmxnet这两个模块时,会提示如下错误:

代码: 全选

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-16-generic/build/include] 

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
In file included from include/linux/string.h:11,
                 from /tmp/vmware-config0/vmhgfs-only/cpName.h:18,
                 from /tmp/vmware-config0/vmhgfs-only/cpName.c:18:
include/linux/types.h:40: 错误: 与‘uintptr_t’类型冲突
/tmp/vmware-config0/vmhgfs-only/vm_basic_types.h:160: 错误: ‘uintptr_t’的上一个声明在此
make[2]: *** [/tmp/vmware-config0/vmhgfs-only/cpName.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config0/vmhgfs-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmhgfs.ko] 错误 2
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
Unable to build the vmhgfs module.

The filesystem driver (vmhgfs module) is used only for the shared folder 
feature. The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
If you wish to have the shared folders feature, you can install the driver by 
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine. 
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

pcnet32                34820  0 
Unloading pcnet32 module

Trying to find a suitable vmxnet module for your running kernel.

None of the pre-built vmxnet modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmxnet module for
your system (you need to have a C compiler installed on your system)? [yes] 

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmxnet-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config1/vmxnet-only/vmxnet.o
In file included from /tmp/vmware-config1/vmxnet-only/vmxnet.c:35:
/tmp/vmware-config1/vmxnet-only/vm_basic_types.h:160: 错误: 与‘ uintptr_t’类型冲突
include/linux/types.h:40: 错误: ‘uintptr_t’的上一个声明在此
/tmp/vmware-config1/vmxnet-only/vmxnet.c: 在函数‘vmxnet_probe_device’中:
/tmp/vmware-config1/vmxnet-only/vmxnet.c:476: 错误: 隐式声明函数‘SET_MODULE_OWNER’
/tmp/vmware-config1/vmxnet-only/vmxnet.c: 在函数‘vmxnet_open’中:
/tmp/vmware-config1/vmxnet-only/vmxnet.c:674: 错误: ‘SA_SHIRQ’未声明 (在此函数内第一次使用)
/tmp/vmware-config1/vmxnet-only/vmxnet.c:674: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
/tmp/vmware-config1/vmxnet-only/vmxnet.c:674: 错误: 所在的函数内也只报告一次。)
/tmp/vmware-config1/vmxnet-only/vmxnet.c: 在函数‘vmxnet_netpoll’中:
/tmp/vmware-config1/vmxnet-only/vmxnet.c:1058: 错误: 提供给函数‘vmxnet_interrupt’的实参太多
make[2]: *** [/tmp/vmware-config1/vmxnet-only/vmxnet.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config1/vmxnet-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmxnet.ko] 错误 2
make: Leaving directory `/tmp/vmware-config1/vmxnet-only'
Unable to build the vmxnet module.
三、解决方案:
  既然遇到了这些声明错误等,就直接去调试代码。vmware tools的各个模块放在下面这个文件夹里:
    

代码: 全选

/<...>/vmware-tools-distrib/lib/modules/source/
"/<...>/vmware-tools-distrib/"为VMwareTools-5.5.6-80404.tar.gz在你本机上的解压路径。进入上面这个文件夹会发现这几个文件:
    vmdesched.tar vmxnet.tar vmhgfs.tar vmmemctl.tar
其中vmxnet.tar和vmhgfs.tar就是我们需要修改的代码包。具体要修改什么地方,我就不多说了,我把修改好的代码包放在附件中,你们下载下来,并用新的这两个包替换原来的这两个文件,就可以正常安装了。
  我只修改了这两个包里的这些文件:vm_basic_types.h(vmhgfs及vmxnet包都有这个文件)、vmxnet.c(vmxnet包)。具体修改了什么地方,你们用diff命令,与原文件比较就知道了。

三、附件:
再次说明一下使用方法:
  第一、把这两个附件:vmhgfs.tar、vmxnet.tar替换“/<...>/vmware-tools-distrib/lib/modules/source/”目录下的同名文件。

  第二、在命令行下,进入“/<...>/vmware-tools-distrib/”目录,执行以下命令:
    

代码: 全选

zyk@ubuntu:/<...>/vmware-tools-distrib$ sudo ./vmware-install.pl
一路回车即可!

四、2楼说的问题解决了:
  原因:调试后发现不是新版linux内核头文件的问题,而是我的代码包中,没有清除掉在旧版的内核头文件下生成的.o文件(导致make命令没能生成最新的.o文件)。新上传的vmhgfs.tar、vmxnet.tar已经清理了这些object文件,可以正确安装了!

五、成功安装过程:

代码: 全选

zyk@ubuntu:/usr/local/src/vmware-tools-distrib$ sudo ./vmware-install.pl 
A previous installation of VMware software has been detected.

The previous installation was made by the tar installer (version 3).

Keeping the tar3 installer database format.

Uninstalling the tar installation of VMware Tools.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:-ne                                   done

   Guest filesystem driver:-ne                                         done


The removal of VMware Tools 5.5.6 build-80404 for Linux completed successfully.
Thank you for having tried this software.

Installing the content of the package.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 


In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 
The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 5.5.6 build-80404 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 


Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:-ne                                   done

   Guest filesystem driver:-ne                                         done

Trying to find a suitable vmhgfs module for your running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes] 

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-17-generic/build/include] 

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/dev.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/driver.o
/tmp/vmware-config0/vmhgfs-only/driver.c:3994: 璀﹀憡锛?浠庝笉鍏煎鐨勬寚閽堢被鍨嬪垵濮嬪寲
  CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/main.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/staticEscape.o
  LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
The module loads perfectly in the running kernel.

pcnet32                34820  0 
Unloading pcnet32 module

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmxnet-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config0/vmxnet-only/vmxnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmxnet-only/vmxnet.mod.o
  LD [M]  /tmp/vmware-config0/vmxnet-only/vmxnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmxnet.ko ./../vmxnet.o
make: Leaving directory `/tmp/vmware-config0/vmxnet-only'
The module loads perfectly in the running kernel.



Detected X.org version 0.0.0.



No drivers for X.org version: 0.0.0.



Do you want to change your guest X resolution? (yes/no) [no] 

Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:-ne                                done

   Guest filesystem driver:-ne                                         done

   DMA setup:-ne                                                       done

   Guest operating system daemon:-ne                                   done


The configuration of VMware Tools 5.5.6 build-80404 for Linux for this running 
kernel completed successfully.

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 XFree86 session.

To use the vmxnet driver, restart networking using the following commands: 
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/networking start

Enjoy,

--the VMware team
附件
成功vmware-tools,可以与xp共享文件夹!这是截图。
成功vmware-tools,可以与xp共享文件夹!这是截图。
vmhgfs.tar
vmhgfs模块的代码包(更新版)
(330 KiB) 已下载 4720 次
vmxnet.tar
vmxnet模块的代码包(最新版)
(180 KiB) 已下载 3501 次
上次由 chinainvent 在 2008-05-31 12:39,总共编辑 1 次。
chinainvent
帖子: 13
注册时间: 2007-07-26 9:26

#2

帖子 chinainvent » 2008-05-30 15:51

以下问题已经解决!请放心使用!2008年5月31号编辑!

---------------------------------------
  晕哦,刚把ubuntu内核头文件,升级到“linux-headers-2.6.24-17-generic”,重执行./vmware-tools.pl

结果又出问题了,vmhgfs.o模块无法加载进内核。。。如果未升级到这个头文件的朋友,我上面的方法依然有效。如果升级到了这个头文件,我目前还没调试,正在上班,晚上我来看看。调试好了,再发新的附件上来。

错误提示如下:

代码: 全选

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmhgfs-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
  CC [M]  /tmp/vmware-config1/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/dev.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/driver.o
/tmp/vmware-config1/vmhgfs-only/driver.c:3994: 警告: 从不兼容的指针类型初始化
  CC [M]  /tmp/vmware-config1/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/main.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/staticEscape.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-config1/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config1/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-config1/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config1/vmhgfs-only'
Unable to make a vmhgfs module that can be loaded in the running kernel:
insmod: error inserting '/tmp/vmware-config1/vmhgfs.o': -1 Invalid module format
There is probably a slight difference in the kernel configuration between the 
set of C header files you specified and your running kernel.  You may want to 
rebuild a kernel based on that directory, or specify another directory.

The filesystem driver (vmhgfs module) is used only for the shared folder 
feature. The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
If you wish to have the shared folders feature, you can install the driver by 
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine. 
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 
ghoulndu
帖子: 1
注册时间: 2008-06-28 19:27

#3

帖子 ghoulndu » 2008-06-28 19:29

chinainvent你太强大了。共享文件夹的问题我整了好几天都没有搞定,太感谢了
Rorbin
帖子: 1
注册时间: 2008-07-04 0:45

#4

帖子 Rorbin » 2008-07-04 0:47

你好,我现在能够正常安装vmware tool了,但是在hgfs下仍然无法看到windows下已经共享的文件夹。请问应该从哪方面入手找原因,谢谢。
chinainvent
帖子: 13
注册时间: 2007-07-26 9:26

#5

帖子 chinainvent » 2008-07-08 18:27

Rorbin 写了:你好,我现在能够正常安装vmware tool了,但是在hgfs下仍然无法看到windows下已经共享的文件夹。请问应该从哪方面入手找原因,谢谢。
从你的描述来看,我不知道你是什么问题。
到目前为止,我的内核已经由18更新到19,但我上面的方法仍然有效。


我想,你应该先按我的方法来做。
plane123cn
帖子: 1
注册时间: 2008-07-16 14:22

#6

帖子 plane123cn » 2008-07-16 14:35

我的内核升级到2.6.24.19后,不能通过NAT上网了,网络连接那里有一把红叉,不过可以共享,之前在18里都没问题的,请大大解决下~~~
yingzai621
帖子: 1
注册时间: 2008-08-01 0:27

#7

帖子 yingzai621 » 2008-08-01 0:31

The file vmhgfs.tar is not correctly!!! Here is the correct one.
附件
vmhgfs.tar
Correct one
(330 KiB) 已下载 658 次
tenger
帖子: 6
注册时间: 2008-08-01 11:40

#8

帖子 tenger » 2008-08-01 15:39

我的有问题,用的6.0的vmware



代码: 全选

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config22/vmmemctl-only'
make -C /lib/modules/2.6.24-20-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-20-generic'
  CC [M]  /tmp/vmware-config22/vmmemctl-only/os.o
在包含自 /tmp/vmware-config22/vmmemctl-only/os.c:40 的文件中:
/tmp/vmware-config22/vmmemctl-only/compat_wait.h:37:5: 警告: “VMW_HAVE_EPOLL”未定义
/tmp/vmware-config22/vmmemctl-only/compat_wait.h:43:5: 警告: “VMW_HAVE_EPOLL”未定义
In file included from /tmp/vmware-config22/vmmemctl-only/os.c:40:
/tmp/vmware-config22/vmmemctl-only/compat_wait.h:60: 错误: 与‘poll_initwait’类型冲突
include/linux/poll.h:65: 错误: ‘poll_initwait’的上一个声明在此
make[2]: *** [/tmp/vmware-config22/vmmemctl-only/os.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config22/vmmemctl-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-20-generic'
make: *** [vmmemctl.ko] 错误 2
make: Leaving directory `/tmp/vmware-config22/vmmemctl-only'
Unable to build the vmmemctl module.

The memory manager driver (vmmemctl module) is used by VMware host software to 
efficiently reclaim memory from a virtual machine.
If the driver is not available, VMware host software may instead need to swap 
guest memory to disk, which may reduce performance.
The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
If you want the memory management feature, you can install the driver by 
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine. 
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Trying to find a suitable vmhgfs module for your running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes] 

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config23/vmhgfs-only'
make -C /lib/modules/2.6.24-20-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-20-generic'
  CC [M]  /tmp/vmware-config23/vmhgfs-only/cpName.o
In file included from /tmp/vmware-config23/vmhgfs-only/vm_assert.h:30,
                 from /tmp/vmware-config23/vmhgfs-only/cpName.c:17:
/tmp/vmware-config23/vmhgfs-only/vm_basic_types.h:159: 错误: typedef‘uintptr_t’重定义
./include/linux/types.h:40: 错误: ‘uintptr_t’的上一个声明在此
make[2]: *** [/tmp/vmware-config23/vmhgfs-only/cpName.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config23/vmhgfs-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-20-generic'
make: *** [vmhgfs.ko] 错误 2
make: Leaving directory `/tmp/vmware-config23/vmhgfs-only'
Unable to build the vmhgfs module.

The filesystem driver (vmhgfs module) is used only for the shared folder 
feature. The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
If you wish to have the shared folders feature, you can install the driver by 
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine. 
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Trying to find a suitable vmblock module for your running kernel.

None of the pre-built vmblock modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmblock module 
for your system (you need to have a C compiler installed on your system)? 
[yes] 

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config24/vmblock-only'
make -C /lib/modules/2.6.24-20-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-20-generic'
  CC [M]  /tmp/vmware-config24/vmblock-only/linux/block.o
在包含自 /tmp/vmware-config24/vmblock-only/linux/os.h:21 的文件中,
                 从 /tmp/vmware-config24/vmblock-only/linux/block.c:12:
/tmp/vmware-config24/vmblock-only/./include/compat_wait.h:37:5: 警告: “VMW_HAVE_EPOLL”未定义
/tmp/vmware-config24/vmblock-only/./include/compat_wait.h:43:5: 警告: “VMW_HAVE_EPOLL”未定义
In file included from /tmp/vmware-config24/vmblock-only/linux/os.h:21,
                 from /tmp/vmware-config24/vmblock-only/linux/block.c:12:
/tmp/vmware-config24/vmblock-only/./include/compat_wait.h:60: 错误: 与‘poll_initwait’类型冲突
include/linux/poll.h:65: 错误: ‘poll_initwait’的上一个声明在此
In file included from /tmp/vmware-config24/vmblock-only/linux/vmblockInt.h:26,
                 from /tmp/vmware-config24/vmblock-only/linux/block.c:15:
/tmp/vmware-config24/vmblock-only/./include/vm_basic_types.h:168: 错误: typedef‘uintptr_t’重定义
include/linux/types.h:40: 错误: ‘uintptr_t’的上一个声明在此
/tmp/vmware-config24/vmblock-only/linux/block.c: 在函数‘BlockInit’中:
/tmp/vmware-config24/vmblock-only/linux/block.c:66: 错误: 提供给函数‘kmem_cache_create’的实参太多
make[2]: *** [/tmp/vmware-config24/vmblock-only/linux/block.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config24/vmblock-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-20-generic'
make: *** [vmblock.ko] 错误 2
make: Leaving directory `/tmp/vmware-config24/vmblock-only'
Unable to build the vmblock module.
polind
帖子: 23
注册时间: 2006-09-21 5:36

#9

帖子 polind » 2008-08-06 10:48

我的也有问题,同样用的6.0的vmware
用上面的包替换了,装了好几次,每次到了最后就说Mounting HGFS shares failed



代码: 全选



ubuntu@ubuntu:/tmp/vmware-tools-distrib$ sudo ./vmware-install.pl




A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

Uninstalling the tar installation of VMware Tools.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done
 * Deconfiguring network interfaces...                                                                                [ OK ] 
   Guest vmxnet fast network device:                                   done

File /etc/X11/xorg.conf is backed up to /etc/X11/xorg.conf.old.1.

File /etc/fstab is backed up to /etc/fstab.old.1.

File /etc/updatedb.conf is backed up to /etc/updatedb.conf.old.1.

The removal of VMware Tools 6.0.0 build-45731 for Linux completed successfully.
Thank you for having tried this software.

Installing VMware Tools.  This may take from several minutes to over an hour 
depending upon its size.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 6.0.0 build-45731 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 


Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done
 * Deconfiguring network interfaces...                                                                                [ OK ] 
   Guest vmxnet fast network device:                                   done
Trying to find a suitable vmmemctl module for your running kernel.

None of the pre-built vmmemctl modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmmemctl module 
for your system (you need to have a C compiler installed on your system)? 
[yes] 

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-16-generic/build/include] 

Extracting the sources of the vmmemctl module.


这部分有error
==============================================


Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config0/vmmemctl-only/os.o
In file included from /tmp/vmware-config0/vmmemctl-only/os.c:40:
/tmp/vmware-config0/vmmemctl-only/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config0/vmmemctl-only/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config0/vmmemctl-only/os.c:40:
/tmp/vmware-config0/vmmemctl-only/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
make[2]: *** [/tmp/vmware-config0/vmmemctl-only/os.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmemctl-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmmemctl.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
Unable to build the vmmemctl module.

The memory manager driver (vmmemctl module) is used by VMware host software to 
efficiently reclaim memory from a virtual machine.
If the driver is not available, VMware host software may instead need to swap 
guest memory to disk, which may reduce performance.
The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
If you want the memory management feature, you can install the driver by 
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine. 
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

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




HGFS模块装载
—————————————————————————————————————————————


Trying to find a suitable vmhgfs module for your running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your 
running kernel.  Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes] 

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmhgfs-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config1/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/dev.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/driver.o
/tmp/vmware-config1/vmhgfs-only/driver.c:3994: warning: initialization from incompatible pointer type
  CC [M]  /tmp/vmware-config1/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/main.o
  CC [M]  /tmp/vmware-config1/vmhgfs-only/staticEscape.o
  LD [M]  /tmp/vmware-config1/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config1/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-config1/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config1/vmhgfs-only'
The module loads perfectly in the running kernel.
 
虽然最后说perfectly................
—————————————————————————————————————————————






pcnet32                34820  0 
Unloading pcnet32 module

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmxnet-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config1/vmxnet-only/vmxnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config1/vmxnet-only/vmxnet.mod.o
  LD [M]  /tmp/vmware-config1/vmxnet-only/vmxnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
cp -f vmxnet.ko ./../vmxnet.o
make: Leaving directory `/tmp/vmware-config1/vmxnet-only'
The module loads perfectly in the running kernel.



这部分有error
==============================================


Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmblock-only'
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  /tmp/vmware-config1/vmblock-only/linux/block.o
In file included from /tmp/vmware-config1/vmblock-only/linux/os.h:21,
                 from /tmp/vmware-config1/vmblock-only/linux/block.c:12:
/tmp/vmware-config1/vmblock-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config1/vmblock-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config1/vmblock-only/linux/os.h:21,
                 from /tmp/vmware-config1/vmblock-only/linux/block.c:12:
/tmp/vmware-config1/vmblock-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
In file included from /tmp/vmware-config1/vmblock-only/linux/vmblockInt.h:26,
                 from /tmp/vmware-config1/vmblock-only/linux/block.c:15:
/tmp/vmware-config1/vmblock-only/./include/vm_basic_types.h:170: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
/tmp/vmware-config1/vmblock-only/linux/block.c: In function ‘BlockInit’:
/tmp/vmware-config1/vmblock-only/linux/block.c:66: error: too many arguments to function ‘kmem_cache_create’
make[2]: *** [/tmp/vmware-config1/vmblock-only/linux/block.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmblock-only'
Unable to build the vmblock module.

The vmblock module enables dragging or copying files from within a host and 
dropping or pasting them onto your guest (host to guest drag and drop and file 
copy/paste).  The rest of the software provided by VMware Tools is designed to 
work independently of this feature (including guest to host drag and drop and 
file copy/paste).


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


If you would like the host to guest drag and drop and file copy/paste features,
you can install the driver by running vmware-config-tools.pl again after making
sure that gcc, binutils, make and the kernel sources for your running kernel 
are installed on your machine. These packages are available on your 
distribution's installation CD.
[ Press Enter key to continue ] 

[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service 
provides a new communication capability with the Host, primarily for 
development at the moment.  Would you like to enable this feature? [no] 



Detected X.org version 0.0.0.



No drivers for X.org version: 0.0.0.



Do you want to change the display size that X starts with? (yes/no) [no] 



到最后还是failed,郁闷
+++++++++++++++++++++++++++++++++++++++++++++++++++++++



Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest filesystem driver:                                                  done
   Mounting HGFS shares:                                                      failed
   Guest vmxnet fast network device:                                 done
   DMA setup:                                                                      done
   Guest operating system daemon:                                   done

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

The configuration of VMware Tools 6.0.0 build-45731 for Linux for this running 
kernel completed successfully.

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 use the vmxnet driver, restart networking using the following commands: 
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/networking start

To make use of the virtual printer, you will need to restart the CUPS service

If you wish to configure any experimental features, please run the following 
command: "vmware-config-tools.pl --experimental".

Enjoy,

--the VMware team

ronaldohf
帖子: 9
注册时间: 2008-07-31 0:03

#10

帖子 ronaldohf » 2008-08-10 20:57

谢谢了哦!试试!
csjl
帖子: 37
注册时间: 2008-05-02 11:42

#11

帖子 csjl » 2008-08-16 19:13

做个记号,我的装了Tools,依然不能和宿主机(XP)共享文件夹。在虚拟机(Ubuntu8.04)里能找到hfgs空文件夹,看不到内容。
110823702
帖子: 2
注册时间: 2008-08-18 20:50

#12

帖子 110823702 » 2008-08-18 21:33

我也是这个问题呀,求救。。。
xianshui
帖子: 1
注册时间: 2008-08-24 8:58

#13

帖子 xianshui » 2008-08-24 9:12

楼主太强了,我在vmware5.5.3上试过了也可以
yangxinying19841010
帖子: 7
注册时间: 2008-09-06 9:13

#14

帖子 yangxinying19841010 » 2008-09-06 9:40

太强大了,我的终于能共享文件了。但是又不能上网了。不知道咋回事儿。
yangxinying19841010
帖子: 7
注册时间: 2008-09-06 9:13

#15

帖子 yangxinying19841010 » 2008-09-06 9:59

为什么我装上以后,鼠标切换还是要按ctrl+alt啊。我是新手,请指教。谢谢。
回复