Compilazione di VMWare-tools su Ubuntu Hardy
Dopo aver installato VMWare server su Ubuntu 8.04 vi verrà sicuramente voglia di metterci dentro anche VMWare-tools, ovverosia quegli strumenti che ci consentono un uso indubbiamente più intenso della nostra macchina virtuale.
Ecco il procedimento:
- sudo apt-get install build-essential linux-headers-$(uname -r);
- tar -xzf VMwareTools-1.0.6-91891.tar.gz;
- cd vmware-tools-distrib/
- sudo ./vmware-install.pl
Tuttavia la vostra esperienza con questi strumenti rischierebbe di essere frustrante se non vi venisse in aiuto questo post che spiega come ovviare all’errore:
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only’
make -C /lib/modules/2.6.24-19-server/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-server’
CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
In file included from include/linux/string.h:11,
from /tmp/vmware-config0/vmhgfs-only/cpName.h:18,
from /tmp/vmware-config0/vmhgfs-only/cpName.c:18:
include/linux/types.h:40: error: conflicting types for ‘uintptr_t’
/tmp/vmware-config0/vmhgfs-only/vm_basic_types.h:161: error: previous declaration of ‘uintptr_t’ was here
make[2]: *** [/tmp/vmware-config0/vmhgfs-only/cpName.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-server’
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only’
Unable to build the vmhgfs module.
Il problema è stato risolto sul forum di vmware semplicemente usando open-vmware-tools per creare il modulo del kernel e successivamente installando vmware-tools normalmente (sudo ./vmware-install.pl):
- sudo apt-get install libproc-dev libdumbnet-dev libicu-dev;
- wget http://mesh.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2008.07.01-102166.tar.gz;
- tar -xzf open-vm-tools-*.tar.gz
- cd open-vm-tools-*
- ./configure –without-x
- make
- cd modules/linux
- for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
- cd ../../../
- mv -f open-vm-tools-*/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/
- cd vmware-tools-distrib/
- sudo ./vmware-install.pl
Adesso è tutto OK!
Bentornato!











