在Ubuntu 12.04中安装和配置vmware tools

来源:互联网 发布:好易网络电视tv版下载 编辑:程序博客网 时间:2024/05/16 10:43

(来源:http://www.cnblogs.com/SelaSelah/archive/2013/02/17/2914412.html)

Ubuntu内核升级后,和主机间的共享可能会失效,这时就需要重新安装vmware tools了

1. 重新安装VMWare Tools

解压vmware tools,得到vmware-tools-distrib文件夹,用root权限运行其下的vmware-install.pl文件

tar -xzvf VMwareTolls-9.2.3-1031360.tar.gz
cd vmware-tools-distrib

sudo ./vmware-install.pl

安装分为三个步骤:

  1. 卸载旧版本
  2. 安装新版本
  3. 配置新版本(以后也可以手动执行/usr/bin/vmware-config-tools.pl

     

2. 配置中遇到的问题

在第3步中,可能会出现以下问题:

Searching for a valid kernel header path...
The path "" is not a valid path to the 3.5.0-23-generic kernel headers.
Would you like to change it? [yes]

需要安装linux-headers-3.5.0-23-generic包,具体版本可能不同,请自行对照(uname -r)。

sudo apt-get install linux-headers-3.5.0-23-generic

也可以使用如下的通用命令

sudo apt-get install linux-headers-`uname -r`

然后把目录更改为有效目录

Enter the path to the kernel header files for the 3.5.0-23-generic kernel?
/usr/src/linux-headers-3.5.0-23-generic/include

The path "/usr/src/linux-headers-3.5.0-23-generic/include" appears to be a
valid path to the 3.5.0-23-generic kernel headers.
Would you like to change it? [no]

其他地方难度不大,vmware tools安装完成。

然后就可以用/mnt/hgfs/中访问共享文件了。


(来源:http://www.cppblog.com/wuxu/archive/2013/10/25/203913.html)

Ubuntu 12.04 LTS安装VMware Tools无法找到kernel header path的问题 (转)
Ubuntu 12.04 安装 VMware Tools,运行vmware-config-tools.pl 时,总是提示
The path "" is not valid.
What is the location of the directory of C header files that match your running
kernel?

输入 /usr/src/linux-headers-3.8.0-29-generic/include

或 /lib/modules/3.8.0-26-generic/build/include 都提示“The path ...  is not valid.”。

 
用了半天时间才找到解决方案 555....分享一下。
 
1. 更新或安装linux headers

sudo apt-get update

sudo apt-get install build-essential

sudo apt-get install linux-headers-$(uname -r)

 

2. 关联文件,就是因为找不到这个几个文件,vmware tools才认为路径无效的。

cd /lib/modules/$(uname -r)/build/include/linux

sudo ln -s ../generated/utsrelease.h

sudo ln -s ../generated/autoconf.h

sudo ln -s ../generated/uapi/linux/version.h

就是因为没有最后这个链接,一直失败,郁闷啊。

 

3. 再次执行安装就ok啦,运行vmware-config-tools.pl 也没问题了。

sudo ./vmware-install.pl

---------------------分割线--------------------------------------
执行了上面的步骤之后,安装仍然出错:

/tmp/vmware-root/modules/vmhgfs-only/filesystem.c:48:28: 致命错误: linux/smp_lock.h:没有那个文件或目录
编译中断。
make[2]: *** [/tmp/vmware-root/modules/vmhgfs-only/filesystem.o] 错误 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmhgfs-only] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-3.8.0-29-generic'
make: *** [vmhgfs.ko] 错误 2
make:离开目录“/tmp/vmware-root/modules/vmhgfs-only”

The filesystem driver (vmhgfs module) is used only for the shared folder
feature. The rest of the software provided by VMware Tools is designed to work
independently of this feature.

If you wish to have the shared folders feature, you can install the driver by
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine.
These packages are available on your distribution's installation CD.
[ Press Enter key to continue ]

========以上是错误信息==================

是不是因为binutils没有安装?因为安装是通过执行sudo ./vmware-install.pl启动的,这是一个perl程序?缺乏相关环境配置?


0 0