最小化安装的centos少一些安装vmware tools的必要工具,先安装这些工具再安装vmware tools能省不少力气。
[root@centos-vm vmware-tools-distrib]# yum -y install perl gcc make kernel-devel-$(uname -r) [root@centos-vm vmware-tools-distrib]# ./vmware-install.pl
如果安装过程中提示找不到kernel header,可以手动输入一个路径,centos在 /usr/src/kernels/2.6.32-220.el6.i686/include,比如:
Searching for a valid kernel header path... The path "" is not valid. Would you like to change it? [yes] yes What is the location of the directory of C header files that match your running kernel? /usr/src/kernels/2.6.32-220.el6.i686/include The path "/usr/src/kernels/2.6.32-220.el6.i686/include" appears to be a valid path to the kernel headers of the running kernel. Would you like to change it? [no]
kernel-devel要安装对应版本的才行,如果添加了remi或epel源不指定版本默认安装最新版本,如果和当前版本不一致导致vmware tools安装失败,可以使用uname -r 查看当前版本,最后不得不说yum这东西真他X的方便。