Manually building VMware Tools kernel modules in Ubuntuguests
转自:http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008973
Details
While running the /usr/bin/vmware-config-tools.plscript during the VMware Tools installation, you might need tomanually build the VMware Tools kernel modules on an Ubuntu guest.For example, if the guest does not have support for prebuilt kernelmodules (PBMs), you will need to build them manually. PBMs are acollection of Linux drivers that facilitate optimal operation ofthe virtual machine.
Solution
MissingPrebuilt Kernel Modules
If the /usr/bin/vmware-config-tools.plscript cannot locate prebuilt kernel modules for your guest, thefollowing message appears:
None of the pre-builtvmmemctl modules for VMware Tools is suitable for your runningkernel. Do you want this program to try to build the vmmemctlmodule for your system (you need to have a C compiler installed onyour system)? [yes]
Solution: Press Y to continue the installprocess.
MissingCompiler Program
If the /usr/bin/vmware-config-tools.plscript cannot find a C compiler program on your system, one of thefollowing messages appears:
- Unable to find the 'make'program.
Solution: Run the apt-get install build-essentialcommand to install the packagesneeded to build the kernel modules.
- Setupis unable to find the 'make' program on your machine. Please makesure it is installed. Do you want to specify the location of thisprogram by hand? [yes]
Solution: Provide thecomplete name of a binary 'make' file.
- PressY to continue. Thefollowing message appears: What is the location of the 'make'program on your machine?
- Enter thecomplete name of a binary 'make' file.If you do not provide thecomplete name, the following message appears: The answer "<binaryfile name> is invalid. It must be the completename of a binary file.
Locating and Installing the C HeaderFiles
If the script cannot locate the C header filesin the default directory, /usr/src/linux/include, thefollowing message appears:
What is the location of the directory of Cheader files that match your running kernel?
Solution: In a terminal window, run thefollowing commands to install the Linux C header files:
- Run the uname -r command to find the kernel version. Anexample of the output: 2.6.24-23-server.
- Run the apt-cache search<version number> command to get the list of packages thatincludes the version number. For example: apt-cache search2.6.24-23-server.
Check the list and locate the linux-headerspackage name ( linux-headers-<kernelversion>). For example: linux-headers-2.6.24-23-server. - Run the apt-get installlinux-headers-<kernel version>command to install the Linux Cheader files on your system. For example: apt-get installlinux-headers-2.6.24-23-server.
Alternatively, you can run the command:
aptitude installlinux-headers-$(uname-r)
GeneralInstructions
- Installing VMware Tools in aLinux virtual machine using Compiler(1018414)
– This article contains a videowalkthrough for installing Tools in a Workstationguest. - Installing VMware Tools inan Ubuntu virtual machine(1022525)
– Thisarticle was written specifcally for Fusion users.
For translated versions of thisarticle, see: