1. 程式人生 > >ubuntu 下的 vmware tool 安裝 !

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.

解決方法:

下載需要的檔案

作用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 /***