您的位置:首页 > Web前端

vmware tools 安装不上,报错/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.c:685: error: too few arguments to

2013-03-04 21:51 573 查看
vmware tools 安装不上,报错

make[1]: Entering directory `/usr/src/kernels/2.6.22.6-1-i686'

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/backdoor.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/backdoorGcc32.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/bdhandler.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/cpName.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/cpNameLinux.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/cpNameLite.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/dentry.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/dir.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/file.o

CC [M] /tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.o

/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.c: In function ‘HgfsInitFileSystem’:

/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.c:685: error: too few arguments to function ‘kmem_cache_create’

make[2]: *** [/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.o] 错误 1

make[1]: *** [_module_/tmp/modconfig-IgPiI7/vmhgfs-only] 错误 2

make[1]: Leaving directory `/usr/src/kernels/2.6.22.6-1-i686'

make: *** [vmhgfs.ko] 错误 2

make: Leaving directory `/tmp/modconfig-IgPiI7/vmhgfs-only'

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.

解决:请将vmware tools的安装文件解压到用户目录下(~/vmware-tools-distrib)。

首先进入此目录:

$ cd ~/vmware-tools-distrib

把将要更改的文件分离出来备份:

$ mv lib/modules/source/vmhgfs.tar vmhgfs.tar.orig

解压缩此文件:

$ tar -xvf vmhgfs.tar.orig

编辑文件解压后生成的vmhgfs-only目录中的compat_slab.h:

$ vim vmhgfs-only/compat_slab.h

找到此行:

if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) || defined(VMW_KMEMCR_HAS_DTOR)

更改为:

if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 22) || defined(VMW_KMEMCR_HAS_DTOR)

就是把小于(<)改为小于等于(<=).

现在我们已基本完成了,仅需重新打包压缩更改的文件夹,并把它拷贝回去(lib/modules/source/vmhgfs.tar):

tar -cvf lib/modules/source/vmhgfs.tar vmhgfs-only

重新设置vmware tools:

$ vmware-config-tools.pl
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐