手动编译VMware Tools 内核模块

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.

  1. PressY to continue. Thefollowing message appears: What is the location of the 'make'program on your machine?
  2. 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:

  1. Run the uname -r command to find the kernel version. Anexample of the output: 2.6.24-23-server.
  2. 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.
  3. 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.
After the script detects theheader files, it will use them in building the kernelmodules.

Alternatively, you can run the command:

aptitude installlinux-headers-$(uname-r)   

GeneralInstructions

For generalinstructions on installing VMware Tools in an Ubuntu Guest,see:

 

AdditionalInformation:

For translated versions of thisarticle, see:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值