Vmware Tools安装出错的解决方法
来源:互联网 发布:怎样举报网络非法赌博 编辑:程序博客网 时间:2024/05/17 07:12
Vmware Tools安装出错的解决方法
Vmware Tools安装过程,如果出现vmhgfs编译出错,会造成共享文件夹不可用,提示“无法更新运行时文件夹共享状态: 在客户机操作系统中装载共享文件夹”。
解决方法:
cd vmware-tools-distrib/lib/modules/sourcetar xf vmhgfs.tar
解压出vmhgfs-only文件夹,对下面提到的错误文件进行修改(修改前先改文件属性为可写),修改后重新打包再安装。
tar cf vmhgfs.tar vmhgfs-onlysudo ./vmware-install.pl
本人在 安装过程中依次遇到了一下三个错误:
错误一:
/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c: Infunction ‘HgfsPackDirOpenRequest’:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:417:26:error: ‘struct file’ has no member named ‘f_dentry’ file->f_dentry) < 0) { ^/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c: Infunction ‘HgfsDirLlseek’:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:707:32:error: ‘struct file’ has no member named ‘f_dentry’ struct dentry *dentry = file->f_dentry; ^In file included from/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:39:0:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c: Infunction ‘HgfsReaddirNextEntry’:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:993:31:error: ‘struct file’ has no member named ‘f_dentry’ si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb); ^/tmp/modconfig-VTzwHO/vmhgfs-only/module.h:89:62:note: in definition of macro ‘HGFS_SB_TO_COMMON’ #define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info) ^/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:1082:26:error: ‘struct file’ has no member named ‘f_dentry’ *entryIno = file->f_dentry->d_inode->i_ino; ^In file included from/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:30:0:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:1088:44:error: ‘struct file’ has no member named ‘f_dentry’ *entryIno = compat_parent_ino(file->f_dentry); ^/tmp/modconfig-VTzwHO/vmhgfs-only/./shared/compat_fs.h:120:46:note: in definition of macro ‘compat_parent_ino’ #define compat_parent_ino(dentry) parent_ino(dentry) ^/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:1093:52:error: ‘struct file’ has no member named ‘f_dentry’ *entryIno = HgfsGetFileInode(&entryAttrs,file->f_dentry->d_inode->i_sb); ^/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c: Infunction ‘HgfsDoReaddir’:/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:1173:13:error: ‘struct file’ has no member named ‘f_dentry’ !(file->f_dentry) || ^/tmp/modconfig-VTzwHO/vmhgfs-only/dir.c:1174:13:error: ‘struct file’ has no member named ‘f_dentry’ !(file->f_dentry->d_inode)) { ^make[2]: ***[/tmp/modconfig-VTzwHO/vmhgfs-only/dir.o] Error 1make[1]: ***[_module_/tmp/modconfig-VTzwHO/vmhgfs-only] Error 2make[1]: Leaving directory`/usr/src/linux-headers-3.19.0-25-generic'make: *** [vmhgfs.ko] Error 2make: Leaving directory`/tmp/modconfig-VTzwHO/vmhgfs-only'
解决:将vmhgfs-only/dir.c,vmhgfs-only/page.c,vmhgfs-only/file.c,vmhgfs-only/fsutil.c等文件里的f_dentry替换成f_path.dentry。
错误二:
In file included frominclude/linux/list.h:8:0, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/mm.h:9, from include/linux/pagemap.h:7, from /tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:29:/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:In function ‘HgfsPermission’:include/linux/kernel.h:811:27: error:‘struct dentry’ has no member named ‘d_alias’ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #define hlist_entry(ptr, type, member)container_of(ptr,type,member) ^include/linux/list.h:699:15: note: inexpansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:709:13: note: inexpansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^include/linux/kernel.h:811:48: warning:initialization from incompatible pointer type [enabled by default] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #define hlist_entry(ptr, type, member)container_of(ptr,type,member) ^include/linux/list.h:699:15: note: inexpansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:709:13: note: inexpansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^In file included frominclude/linux/compiler-gcc.h:106:0, from include/linux/compiler.h:54, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from/tmp/modconfig-E9Upvb/vmhgfs-only/./shared/driver-config.h:71, from /tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:26:include/linux/compiler-gcc4.h:14:34: error:‘struct dentry’ has no member named ‘d_alias’ #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) ^include/linux/stddef.h:17:31: note: inexpansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) ^include/linux/kernel.h:812:29: note: inexpansion of macro ‘offsetof’ (type *)( (char *)__mptr - offsetof(type,member) );}) ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #define hlist_entry(ptr, type, member)container_of(ptr,type,member) ^include/linux/list.h:699:15: note: inexpansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:709:13: note: inexpansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^In file included frominclude/linux/preempt.h:10:0, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, frominclude/linux/gfp.h:5, from include/linux/mm.h:9, from include/linux/pagemap.h:7, from /tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:29:include/linux/list.h:711:35: error: ‘structdentry’ has no member named ‘d_alias’ pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) ^include/linux/list.h:698:12: note: indefinition of macro ‘hlist_entry_safe’ ({typeof(ptr) ____ptr = (ptr); \ ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^include/linux/list.h:711:35: error: ‘structdentry’ has no member named ‘d_alias’ pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) ^include/linux/list.h:698:28: note: indefinition of macro ‘hlist_entry_safe’ ({typeof(ptr) ____ptr = (ptr); \ ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^In file included frominclude/linux/list.h:8:0, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/mm.h:9, from include/linux/pagemap.h:7, from /tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:29:include/linux/kernel.h:811:27: error:‘struct dentry’ has no member named ‘d_alias’ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #define hlist_entry(ptr, type, member)container_of(ptr,type,member) ^include/linux/list.h:699:15: note: inexpansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:711:13: note: inexpansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^include/linux/kernel.h:811:48: warning:initialization makes pointer from integer without a cast [enabled by default] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #define hlist_entry(ptr, type, member)container_of(ptr,type,member) ^include/linux/list.h:699:15: note: in expansionof macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:711:13: note: inexpansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(dentry, ^In file included frominclude/linux/compiler-gcc.h:106:0, from include/linux/compiler.h:54, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from/tmp/modconfig-E9Upvb/vmhgfs-only/./shared/driver-config.h:71, from /tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:26:include/linux/compiler-gcc4.h:14:34: error:‘struct dentry’ has no member named ‘d_alias’ #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) ^include/linux/stddef.h:17:31: note: inexpansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) ^include/linux/kernel.h:812:29: note: inexpansion of macro ‘offsetof’ (type *)( (char *)__mptr - offsetof(type,member) );}) ^include/linux/list.h:688:40: note: inexpansion of macro ‘container_of’ #definehlist_entry(ptr, type, member) container_of(ptr,type,member) ^include/linux/list.h:699:15: note: inexpansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ ^include/linux/list.h:711:13: note: inexpansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) ^/tmp/modconfig-E9Upvb/vmhgfs-only/inode.c:1922:7:note: in expansion of macro ‘hlist_for_each_entry’hlist_for_each_entry(dentry,
解决:将vmhgfs-only/inode.c文件里的d_alias 替换成d_u.d_alias。
错误三:
/tmp/modconfig-4aUBme/vmhgfs-only/page.c:In function ‘HgfsWbRequestUnlock’:/tmp/modconfig-4aUBme/vmhgfs-only/page.c:1681:4:error: implicit declaration of function ‘smp_mb__before_clear_bit’[-Werror=implicit-function-declaration] smp_mb__before_clear_bit(); ^/tmp/modconfig-4aUBme/vmhgfs-only/page.c:1683:4:error: implicit declaration of function ‘smp_mb__after_clear_bit’[-Werror=implicit-function-declaration] smp_mb__after_clear_bit(); ^cc1: some warnings being treated as errorsmake[2]: ***[/tmp/modconfig-4aUBme/vmhgfs-only/page.o] Error 1make[1]: ***[_module_/tmp/modconfig-4aUBme/vmhgfs-only] Error 2
解决:将vmhgfs-only/page.c文件里的smp_mb__before_clear_bit();和smp_mb__after_clear_bit();注释掉。
特别申明:本文出处是http://blog.csdn.net/skdev/article/details/47753635
0 0
- Vmware Tools安装出错的解决方法
- Vmware Tools安装出错的解决方法
- VMware Workstation下Centos安装VMware Tools的解决方法
- 安装VMware-tools出错无法共享文件的解决办法
- 无法安装VMware tools?解决方法
- VMware不能安装VMware Tools解决方法
- vmware tools 的安装
- VMware Tools 的安装
- vmware tools 的安装
- vmware tools的安装
- VMware tools的安装
- VMware Tools的安装
- Vmware Tools的安装
- vmware tools的安装
- VMware Tools的安装
- Vmware Tools的安装
- VMware Tools的安装
- VMware Tools的安装
- 别的电脑上的ISE工程放到本电脑上后使用ModelSim仿真时出错的解决办法
- 代码整洁之道读书笔记--注释
- C++ Primer Week2
- AsyncTaskLoader2 设计原理大揭底
- 用Python实现一个1加到n求和功能的函数
- Vmware Tools安装出错的解决方法
- [64]Minimum Path Sum
- jaxp解析xml
- oc字符串 和 注意地方
- setLatestEventInfo(),Builder.getNotification()过时,Android提供的解决方案
- 面对电信运营商HTTP劫持如何是好,投诉太折腾,不如路由器直接屏蔽广告源
- 《C++ primer》英文第五版阅读笔记(六)——类型处理
- C++的精髓——虚函数
- php面向对象(一)