Vmware Tools安装出错的解决方法

Vmware Tools安装过程,如果出现vmhgfs编译出错,会造成共享文件夹不可用,提示“无法更新运行时文件夹共享状态: 在客户机操作系统中装载共享文件夹”。

解决方法:

cd vmware-tools-distrib/lib/modules/source
tar xf vmhgfs.tar

解压出vmhgfs-only文件夹,对下面提到的错误文件进行修改(修改前先改文件属性为可写),修改后重新打包再安装。

tar cf vmhgfs.tar vmhgfs-only
sudo ./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

Vmware Tools安装出错的解决方法相关推荐

  1. Vmware tools安装(已解决VMware和win鼠标不能自由切换问题)

    目录 一.Vmware tools安装 1.方式(1):命令行方式 2.方式二 二.VMware和win鼠标不能自由切换问题 一.Vmware tools安装 1.方式(1):命令行方式 sudo a ...

  2. Office安装出错的解决方法,如“Microsoft Office Professional Plus 2013在安装过程中出错”。

    一.问题 把原来的Office卸载之后再重新下载安装,出现"Microsoft Office Professional Plus 2013在安装过程中出错"等问题. 二.安装出错解 ...

  3. SQL Server 2008 修改安装路径后安装出错的解决方法

    1.安装时如果修改安装路径后报错 例如想把"C:\Program Files\Microsoft SQL Server" 修改为"D:\Program Files\Mic ...

  4. vmware tools安装程序无法继续,Microsoft Runtime DLL安装程序未能完成安装。的解决方法

    vmware tools安装程序无法继续,Microsoft Runtime DLL安装程序未能完成安装.的解决方法 参考文章: (1)vmware tools安装程序无法继续,Microsoft R ...

  5. 警告1909。无法创建快捷方式VMware Workstation Pro.Ink。解决方法(附 VMware_workstation 12的安装方法)

    警告1909.无法创建快捷方式VMware Workstation Pro.Ink.解决方法(附 VMware_workstation 12的安装方法) 参考文章: (1)警告1909.无法创建快捷方 ...

  6. 【网址收藏】安装VMware Tools显示灰色正确解决办法

    安装VMware Tools显示灰色正确解决办法

  7. Numpy安装+导入出错的解决方法

    Numpy安装+导入出错的解决方法 参考文章: (1)Numpy安装+导入出错的解决方法 (2)https://www.cnblogs.com/danscarlett/p/7127490.html 备 ...

  8. Linux:VMware Tools安装方法及共享文件夹设置方法

    VMware Tools安装方法及共享文件夹设置方法 重要参考官网: https://docs.vmware.com/cn/VMware-Workstation-Pro/15.0/com.vmware ...

  9. centos7安装python3.7.4_基于centos7 安装python3.6.4出错的解决方法

    基于centos7 安装python3.6.4出错的解决方法 错误:zipimport.ZipImportError: can't decompress data; zlib not availabl ...

最新文章

  1. WSFC 仲裁模型选择
  2. Windows Server 2012 Hyper-V 与2008R2 Hyper-v、VMware的对比
  3. PowerBI随笔(2)-分组依据进行分组汇总
  4. HDU 1203 I NEED A OFFER!(01背包)
  5. python 列表的推导器和内置函数
  6. Laravel源码解析之HTTP Kernel
  7. 网页防篡改技术_大数据让档案“活”起来:用区块链技术防篡改,用量子加密技术防盗窃...
  8. 【2018.6.7】高一总结暑假前
  9. 常用的四个电路分析方法
  10. win10 往vmware 黑苹果系统无法拖拽复制问题
  11. JMeter教程1 - 介绍环境搭建 (Mac)插件安装
  12. 后浪小萌新Python --- 字典
  13. Matlab逆向归纳法,6.完全信息动态博弈—逆向归纳法和子博弈完美均衡.ppt
  14. LInux中的atime、mtime和ctime
  15. 财务自由人(Financial free man)
  16. 从零学Java(19)之 if else分支结构详解,小AD要搞对面心态!
  17. Linux高级应用(十)控制蜂鸣器的应用程序
  18. omapl138移植uboot系列之在线升级(第八篇完结篇)
  19. python解压函数:extractall
  20. ssd固态硬盘寿命查询检测 SsdDiskInfo工具

热门文章

  1. OpenGL绘制地球仪(包含环境配置)
  2. python 常用库简介
  3. 3|物联网控制|计算机控制-刘川来胡乃平版|第4章:过程通道与人机接口-4.1数字量输入输出通道接口|课堂笔记|ppt
  4. 如何理解方差分析和F分布?
  5. 三星4300多功能一体机清零方法
  6. linux 硬盘、RAID相关命令详解
  7. Element UI select 下拉框样式覆盖
  8. 海洋cms新手入门安装配置教程
  9. MIT公开课18.06 Gilbert Strang 线性代数 笔记1 - Ax=b和四个子空间
  10. ubuntu18.04安装xrdp、vnc4server、xubuntu-desktop重启后鼠标键盘丢失的问题