主机:win7旗舰版

vmware workstation 10.0.7 (其他10.x版本也有这个问题)

客户机:Ubuntu14.04.4-16.x

安装vmware tools时出现下列编译错误,共享文件夹的功能不能实现,剪贴板等正常。

下面是部分错误代码:

  1. <span style="font-size:14px;">/tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsPackDirOpenRequest’:
  2. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:417:26: error: ‘struct file’ has no member named ‘f_dentry’
  3. file->f_dentry) < 0) {
  4. ^
  5. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsDirLlseek’:
  6. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:707:32: error: ‘struct file’ has no member named ‘f_dentry’
  7. struct dentry *dentry = file->f_dentry;
  8. ^
  9. In file included from /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:39:0:
  10. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsReaddirNextEntry’:
  11. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:993:31: error: ‘struct file’ has no member named ‘f_dentry’
  12. si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb);
  13. ^
  14. /tmp/modconfig-O5xscq/vmhgfs-only/module.h:89:62: note: in definition of macro ‘HGFS_SB_TO_COMMON’
  15. #define HGFS_SB_TO_COMMON(sb)             ((HgfsSuperInfo *)(sb)->s_fs_info)
  16. ^
  17. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1082:26: error: ‘struct file’ has no member named ‘f_dentry’
  18. *entryIno = file->f_dentry->d_inode->i_ino;
  19. ^
  20. In file included from /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:30:0:
  21. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1088:44: error: ‘struct file’ has no member named ‘f_dentry’
  22. *entryIno = compat_parent_ino(file->f_dentry);
  23. ^
  24. /tmp/modconfig-O5xscq/vmhgfs-only/./shared/compat_fs.h:120:46: note: in definition of macro ‘compat_parent_ino’
  25. #define compat_parent_ino(dentry) parent_ino(dentry)
  26. ^
  27. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1093:52: error: ‘struct file’ has no member named ‘f_dentry’
  28. *entryIno = HgfsGetFileInode(&entryAttrs, file->f_dentry->d_inode->i_sb);
  29. ^
  30. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c: In function ‘HgfsDoReaddir’:
  31. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1173:13: error: ‘struct file’ has no member named ‘f_dentry’
  32. !(file->f_dentry) ||
  33. ^
  34. /tmp/modconfig-O5xscq/vmhgfs-only/dir.c:1174:13: error: ‘struct file’ has no member named ‘f_dentry’
  35. !(file->f_dentry->d_inode)) {
  36. ^
  37. scripts/Makefile.build:257: recipe for target '/tmp/modconfig-O5xscq/vmhgfs-only/dir.o' failed
  38. make[2]: *** [/tmp/modconfig-O5xscq/vmhgfs-only/dir.o] Error 1
  39. make[2]: ** Esperando que outros processos terminem.
  40. Makefile:1394: recipe for target '_module_/tmp/modconfig-O5xscq/vmhgfs-only' failed
  41. make[1]: *** [_module_/tmp/modconfig-O5xscq/vmhgfs-only] Error 2
  42. make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-15-generic'
  43. Makefile:120: recipe for target 'vmhgfs.ko' failed
  44. make: *** [vmhgfs.ko] Error 2
  45. make: Leaving directory '/tmp/modconfig-O5xscq/vmhgfs-only'
  46. </span>

解决方法:

1. 确保 open-vm-tools没有安装。

sudo apt-get remove open-vm-tools

2.确保完成更新

sudo apt-get update

3.安装了git

sudo apt-get install git

4.运行命令从库中获取工具.

sudo git clone https://github.com/rasa/vmware-tools-patches.git

或者

sudo git clone https://github.com/rasa/vmware-tools-patches

5.进入vmware-tools-folder目录

cd vmware-tools-patches

6.运行补丁下载工具

sudo ./download-tools.sh

下载所有的补丁,或者

sudo ./download-tools.sh latest

下载最新的补丁

7.解压并打补丁

sudo ./untar-and-patch.sh

8.运行 complie.sh file

sudo ./compile.sh

下面的图片就是我打完补丁后的共享文件夹截图:

本文转自:https://communities.vmware.com/thread/509898?start=0&tstart=0

原文中是在vmware workstation 11中安装Ubuntu 15.04,但是经过测试,在vmware 10中安装Ubuntu 14.04也可以使用同样的解决方法

ubuntu 客户机安装VMware tools时出现编译错误,无法与主机共享文件(转)的更多相关文章

  1. vmware 中ubuntu客户机 安装vmware tool vmhgfs 共享文件夹失败处理

    vmware版本:10.0.0 build-1295980 ubuntu版本:3.13.0-62-generic 先安装的vmware workstation自带光盘中vmare tools包,安装完 ...

  2. 无法安装 VMware Tools。尝试访问安装 VMware Tools 所需的图像文件“/usr/lib/vmware/isoimages/linuxPreGlibc25.iso”时出错: 2 (No such file or directory)。请参考产品文档或知识库文章 2129825,了解关于如何获取该客户机操作系统的 VMware Tools 软件包的详细信息。

    无法安装 VMware Tools.尝试访问安装 VMware Tools 所需的图像文件"/usr/lib/vmware/isoimages/linuxPreGlibc25.iso&quo ...

  3. vmware workstation12在安装VMware tools时出现问题:A previous installation of VMware Tools has been detected 解决

    win10安装的vmware workstation12在安装VMware tools时出现问题: root@lc:/root/vmware-tools-distrib# ./vmware-insta ...

  4. Ubuntu 16.04 安装 VMware Tools(解决windows和Ubuntu之间不能互相复制粘贴文件的问题)

    Ubuntu 16.04安装虚拟工具VMware Tools,指的是在虚拟机VMWare安装Ubuntu 16.04后再安装VMware Tools的过程.很多人接触Linux都是从虚拟机开始,而安装 ...

  5. vmware下ubuntu虚拟机如何安装vmware tools

      依次点击-->虚拟机-->安装VMware Tools   窗口下方会弹出安装提示   系统会加载安装驱动至光盘 双击--VMwareTools-****.tar.gz--的压缩包   ...

  6. vmware 8下ubuntu 13.04安装vmware tools

    在虚拟机vmware 8.0里安装了ubuntu 13.04.为了方便与主机交互,安装vmware tools. 解压后直接运行 ./vmware-install.pl 一路默认路径安装下来,到&qu ...

  7. ubuntu(centos) server安装vmware tools

    Ubuntu: root登录ubutun $ sudo su vmware中选择菜单虚拟机->安装VMware Tools 命令行如下 // 将cdrom挂载到mnt $ mount -t is ...

  8. Ubuntu下手动安装VMware Tools步骤

    To mount the CD image and extract the contents: Power on the virtual machine. Log in to the virtual ...

  9. CentOS 65 安装vmware tools 杂记

    CentOS 65中安装vmware tools时出现如下错误, centos vmware tools install failure ,no default label for /tmp/vmwa ...

随机推荐

  1. day 55 前端

    前端JQuery 语法 1 关于表格基数偶数背景颜色变换的 2 关于has后代   和not非 3 jQuery 和dom的转换  dom 转换成jQuery 用$(包起来) 不加引号 4  关于 n ...

  2. error_log

    对于我们做php开发的人员,上了生产环境,一定要把相关debug,display_errors错误提示等关掉.谁还难免不犯个错呢?这样能防止非致命性报错下,导致项目路径.数据库等信息泄漏. 问:那么问 ...

  3. hive中left join、left outer join和left semi join的区别

    先说结论,再举例子.   hive中,left join与left outer join等价.   left semi join与left outer join的区别:left semi join相当 ...

  4. 重启uwsgi脚本备份

    NAME="identifyImg_uwsgi.init" if [ ! -n "$NAME" ];then echo "no arguments&q ...

  5. Spring的PropertyPlaceholderConfigurer

    在项目中我们一般将配置信息(如数据库的配置信息)配置在一个properties文件中,如下: jdbcUrl=jdbc:mysql://localhost:3306/flowable?useUnico ...

  6. MySQL(2)数据库 表的查询操作

    来源参考https://www.cnblogs.com/whgk/p/6149009.html 跟着源博客敲一遍可以加深对数据库的理解,同时对其中一些代码做一些改变,可以验证自己的理解. 本文改动了其 ...

  7. 【leetcode】26-RemoveDuplicatesfromSortedArray

    problem RemoveDuplicatesfromSortedArray 注意数组为空的情况要首先考虑,并给出返回值: 注意也要同时给出新的数组的数值: 注意数组最后两个元素的处理: class ...

  8. 利用scrapy下载图片保存到本地

    1.先声明一下,起始位置已经是将所有的图片链接都能到pipelines.py中 2.创建一个类,继承于ImagesPipeline,因此也就需要导入ImagesPipeline from scrapy ...

  9. 改变radio单选按钮的样式

    <div class="choose_btn"> <input type="radio" name="choose_raido&qu ...

  10. How to do distributed locking

    How to do distributed locking 怎样做可靠的分布式锁,Redlock 真的可行么? 本文是对 Martin Kleppmann 的文章 How to do distribu ...