分类: LINUX
2011-09-23 13:54:39
vmware7.1.2下安装了Ubuntu11.04时,无法正确安装Vmware tool
,如果出现报错信息类似如下:
/usr/src/linux-headers-2.6.38-8-generic/arch/x86/include/asm/atomic.h:23:19:
note: expected ‘const struct atomic_t *’ but argument is of type ‘unsigned
int *’
CC [M] /tmp/vmware-root/modules/vmhgfs-only/kernelStubsLinux.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/link.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/message.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/messageBackdoor.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/module.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/page.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/request.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/rpcout.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/stubs.o
CC [M] /tmp/vmware-root/modules/vmhgfs-only/super.o
/tmp/vmware-root/modules/vmhgfs-only/super.c:73:4: error: unknown field ‘
clear_inode’ specified in initializer
make[2]: *** [/tmp/vmware-root/modules/vmhgfs-only/super.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmhgfs-only'
解决方法是:
修改 vmware-tools解压文件下面的 bin/modules/source/vmhgfs.tar
用tar解开打包文件:#tar –xvf vmhgfs.tar
修改super.c文件
#ifndef VMW_USE_IGET_LOCKED
.read_inode = HgfsReadInode,
#endif
.clear_inode = HgfsClearInode,
.put_super = HgfsPutSuper,
.statfs = HgfsStatfs,
};
to (note .clear_inode -> .evict_inode)
#ifndef VMW_USE_IGET_LOCKED
.read_inode = HgfsReadInode,
#endif
.evict_inode = HgfsClearInode,
.put_super = HgfsPutSuper,
.statfs = HgfsStatfs,
};
用tar打包一个目录下的文件
# tar cvf vmhgfs.tar vmhgfs-only 生成一个以.tar为扩展名的打包文件
# cd /tmp/vmware-tools-distrib,再次执行 vmware-config-tools.pl 即可。