xuesn 发表于 2016-1-4 21:18:34

linux 下安装vmware tool

  1: 启动VM中的LINUX系统,在工具栏中选择VM->Intall Vmware Tools把tools的安装包拷贝到光盘中
  
  2: 使用mount -t iso9660 /dev/cdrom /mnt/cdrom挂载光盘
  
  3: 把/mnt/cdrom中的文件,拷贝到/tmp目录中去。
  
  4: 使用tar zxvf  VM*.tar.gz,解压文件
  
  5: 进入vmware-tools-distrib,运行vmware-install.pl  命令。一直按回车,出现以下问题

What is the location of the directory of C header files that match your running kernel?
The path "/usr/src/linux/include" is not an existing directory.
  
  6: 到另一个终端使用 yum -y install gcc gcc-c++ kernel-devel 安装软件 

  
  7: 使用 yum -y update kernel 更新内核

  
  8: rpm -qa | grep kernel 查看是否已经安装了内核。再使用reboot重启系统。使用ln -s /usr/src/kernels/2.6.18-128.1.1.el5-i686/ /usr/src/linux


  
  9: 重启后重新安装tools出现以下问题:

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.18-128.1.1.el5).Even if the module were to
compile successfully, it would not load into the running kernel.

  
  10:编辑/usr/linux/include/linux/version.h文件

#define UTS_RELEASE "2.6.18-128.1.1.el5"
#define LINUX_VERSION_CODE 132626
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#define RHEL_MAJOR 5
#define RHEL_MINOR 3
#define RHEL_RELEASE_CODE 1283
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
  增加第一行。
  
  编译不过,报错。
  
  
  
  
  
  
  
  
  
页: [1]
查看完整版本: linux 下安装vmware tool