sponsored links

Ubuntu虚拟机与win7无法共享文件夹的解决方案!

----------------------

安装vmware-tool时出现如下错误:

make[1]: Entering directory `/usr/src/linux-headers-3.13.0-24-generic'
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/backdoor.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/backdoorGcc32.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/bdhandler.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/cpName.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/cpNameLite.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/dentry.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/dir.o
  CC [M]  /tmp/modconfig-FW4d8m/vmhgfs-only/file.o
/tmp/modconfig-FW4d8m/vmhgfs-only/file.c: In function ‘HgfsOpen’:
/tmp/modconfig-FW4d8m/vmhgfs-only/file.c:659:27: error: incompatible type for argument 3 of ‘HgfsSetUidGid’
                           current_fsuid(), current_fsgid());
                           ^
In file included from /tmp/modconfig-FW4d8m/vmhgfs-only/file.c:46:0:
/tmp/modconfig-FW4d8m/vmhgfs-only/fsutil.h:92:6: note: expected ‘uid_t’ but argument is of type ‘kuid_t’
 void HgfsSetUidGid(struct inode *parent,
      ^
/tmp/modconfig-FW4d8m/vmhgfs-only/file.c:659:27: error: incompatible type for argument 4 of ‘HgfsSetUidGid’
                           current_fsuid(), current_fsgid());
                           ^
In file included from /tmp/modconfig-FW4d8m/vmhgfs-only/file.c:46:0:
/tmp/modconfig-FW4d8m/vmhgfs-only/fsutil.h:92:6: note: expected ‘gid_t’ but argument is of type ‘kgid_t’
 void HgfsSetUidGid(struct inode *parent,
      ^
make[2]: *** [/tmp/modconfig-FW4d8m/vmhgfs-only/file.o] Error 1
make[1]: *** [_module_/tmp/modconfig-FW4d8m/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/modconfig-FW4d8m/vmhgfs-only'

----------------------

解决方案如下:

----------------------

1 - Run: apt-get install dkms linux-headers-$(uname -r) build-essential psmisc

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

3 - Run: cd vmware-tools-patches/patches

4 - Remove every folder except "vmhgfs".

5 - Get the last version of VMwareTools clicking on VMWare Bar > VM > Install/Reinstall VMWare Tools. It will open a virtual CD containing the "tar" file.

6 - Copy VMwareTools-9.2.4-1398046.tar.gz to "vmware-tools-patches" folder.

7 - On "vmware-tools-patches" folder, run: ./untar-and-patch-and-compile.sh

Tags: