Friday, November 21, 2008

VMware tools Linux - Inapropriate build environment

So in Debian one needs to fiddle a bit with the system to be able to install VMware tools. Usually people get compilation errors saying that the compiler has the wrong version, and that for building the modules you need gcc-4.1.3 (error : Inapropriate build environment), and here's how you fix it:

/usr/bin/gcc is a link. Check out what it points at before you proceed:
$>ls -al /usr/bin/gcc
rename the link to something appropriate. Mine points at the latest gcc-4.3.2
%>mv /usr/bin/gcc /usr/bin/gcc.old
remove it, and recreate it:
$>rm /usr/bin/gcc ;
$>ln -s /usr/bin/gcc-4.1.3 /usr/bin/gcc

NOTE: change the gcc link back when you're done

rerun the configuration perl script /usr/bin/vmware-config-tools.pl, and everything should work (provided that you have downloaded the kernel header files, fixed that awful problem with the file that made everything break ... hmm, I can see that I didn't really prepare for writing a howto. However, I got things running with VMware Workstation 6.5.1, and VMware tools on kernel 2.6.26-1 so if you have any questions, I'd be happy to answer them

To get the guest OS to stretch and fit the window, run vmware-user script. A good idea would be to save your session after you run this script, or to run it as an init daemon.