ubuntu 下的 vmware tool 安装 !

         环境说明: 主机 windows xp  , 虚拟机 vmware 5.0      想装一个 PL的linux ,于是用了 ubuntu。 ^_^  第一次。

 近来装了 ubuntu , 系统到是还行顺利 。 主要为了 实现ubuntu 和 ubuntu 之间文件共享! 犯难。。

 

      注意:ubuntu7.10需要VMware Workstation版本足够高(即VMware-tools版本足够高)才能安装VMware-tools成功。

V5.5版不能成功,V6.0才行,不过只要有V6.0版的linux.iso也行,只要替换原linux.iso即可。

 

     如果不幸你有 VMware Workstation版本 不高 。像我, 用 5.0 . 也 太低了 。  从别人讨要了一个 6.0 版本的linux.iso .

重新 指定光驱路径。 比较顺利了

 如下 :
   1.安装编译环境:

  sudo apt-get install build-essential linux-headers-`uname -r`

  2.在VMware的菜单中,点击VM->Install VMware Tools,你将看到有光盘被加载。

  解压缩VMwareTools*.tar.gz文件。执行命令:

  cd ~/Desktop/vmware-tools-distrib

  sudo ./vmware-install.pl

虽然没有提示时 ,路径不对但是出现了What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.17-2-686/include        【注意这里!】   

如下错误:

from /tmp/vmware-config8/vmblock-only/linux/block.c:26:
/tmp/vmware-config8/vmblock-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
In file included from /tmp/vmware-config8/vmblock-only/linux/vmblockInt.h:40,
from /tmp/vmware-config8/vmblock-only/linux/block.c:29:
/tmp/vmware-config8/vmblock-only/./include/vm_basic_types.h:184: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
make[2]: *** [/tmp/vmware-config8/vmblock-only/linux/block.o] Error 1
make[1]: *** [_module_/tmp/vmware-config8/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config8/vmblock-only’
Unable to build the vmblock module.

解决方法:

下载需要的文件

wget http://mesh.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2008.04.14-87182.tar.gz

作用open-vm-tools-2008.04.14-87182.tar.gz 的 文件来替换原来vmware-tool中的文件。

说明:

sudo apt-get install build-essential libgtk2.0-dev
sudo apt-get install libproc-dev libdumbnet-dev xorg-dev
cd Desktop/

安装lib 文件

        Next, we need to unpack the tar files we have at hand:

tar xzvf VMware*.gz
tar xzvf open-vm-tools*.gz

       Next, we’ll build the open-vm-tools:

cd open-vm-tools-2008.04.14-87182/
./configure && make
cd modules/linux/

      In the modules/linux folder we have the vmblock, vmhgfs, vmmemctl, vmsync and vmxnet modules that we need to tar up and place into the official VMware tools tarball:

 

for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
cd ../../..

mv -f open-vm-tools-2008.04.14-87182/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/

 

Now we can run the regular VMware tools installer:

 

cd vmware-tools-distrib/
sudo ./vmware-install.pl

 

在虚拟机上共享你的文件

基本可以mnt/hg /***

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值