最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

VMware下Ubuntu不能和Windows共享文件夹

VMWare crifan 3230浏览 0评论

VMware下Ubuntu不能和Windows共享文件夹

今天遇到个很搞笑的事情。
以前就折腾过Vmware下Ubuntu和Windows的share folder问题,遇到过很多问题,后来也多数解决或规避了。
但是现在发生个好笑的事情,我昨天安装vmware tools的时候,没有太认真看记录,以为所有模块都顺利安装通过了呢。
结果是回来查看log,发现如下内容:
----------------------------------------

Trying to find a suitable vmhgfs module for your running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your
running kernel. Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes]

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmhgfs-only’
make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
CC [M] /tmp/vmware-config1/vmhgfs-only/backdoor.o
CC [M] /tmp/vmware-config1/vmhgfs-only/backdoorGcc32.o
CC [M] /tmp/vmware-config1/vmhgfs-only/bdhandler.o
/tmp/vmware-config1/vmhgfs-only/bdhandler.c:15:27: error: asm/semaphore.h: No such file or directory
make[2]: *** [/tmp/vmware-config1/vmhgfs-only/bdhandler.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmhgfs-only’
Unable to build the vmhgfs module.

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.
[ Press Enter key to continue ]
----------------------------------------

就是说,用于文件共享的hgfs模块根本就没安装成功,搞得我折腾了一段时间,始终没搞懂,为何还不能共享文件。
汗啊。。。

好了,知道原因,就可以慢慢去解决了。

最后弄了半天,发现其他很多模块,除了vmxnet模块之外,都是失败了,
而且还提示,如果想要使用vmxnet,需要重启系统后,输入对应的一些命令,好像就是删除原先的模块,载入新的模块的。
所以,导致了我目前的Ubuntu又不能上网了。
现在索性用VMware的快照,恢复到开始正常的状态,至少能上网,
然后去apt-get,安装足够多的,需要的资源,包括 kernel的src,因此刚才发现Ubuntu里面的src只有common部分,
而其他一些linux本身自带的一些类似于semaphore.h之类头文件,都没有,所以,还是先保证网络能用,下载必要的软件和源码后,
再去折腾vmware tools吧。

之后,如果编译过程中再出现问题,那么再具体解决,应该就没啥问题了。

转载请注明:在路上 » VMware下Ubuntu不能和Windows共享文件夹

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. VMntfs一般是由于VMware-tools版本不对应造成的,暂时好像没什么解决办法,不过可以把网卡设成桥接模式,与主机放同一个网段内,用smb访问。

    现在Ubuntu已经做的比较成熟了,完全可以作为正常桌面来使用,所以还是直接装个双系统用用吧,更能强迫自己去解决问题。
    stars_62515年前 (2009-02-22)回复
85 queries in 0.183 seconds, using 22.17MB memory