Vmware下Ubuntu安装Vmware tools从Vmware VM菜单点击Install Vmware Tools,进入Ubuntu系统,会在桌面出现Vmware Tools的Cd rom图标,接下来在终端依 timberland boots 次输入如下命令:--------------------------该行不输入$sudoapt-get install build-essential
$uname -r(得到内核版本号)
$ sudo apt-get install linux-headers-`uname -r`(把得到的版本号代入到'uname -r')
解压与安装:
$ tar zxf /media/cdrom/VMwa cheap timberland boots reTools- 6.0.2-59824.tar.gz(随版本号改变)
$ cd vmware-tools-distrib
$ sudo ./vmware-install.pl--------------------------该行不输入即可安装Vmware Tools了,根据提示一路enter下去即可,装完重启即可体验现实与虚拟之间的无缝集成了.我照着上面的步骤做时,却出现了找不到make的提示,于 是又找资料,找到了:如果在安装的过程中,系统提示要make路径,那退出 重新以root权限运行 apt-get install gcc apt-get install make apt-get install linux-headers-$(uname-r) build essential gcc然后重复安装 就额可以了
在执行的过程中,我遇到了What is the location of the directory of C header files that match your running的问题。
问题描述:运行./vmware-install.pl后,一直按enter键就ok了,当出现下面这个提示后,你就要小心了.
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
上面提示的意思安装vmware tools必须先安装gcc和内核头文件。
Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
问题来了:它找不到我的内核头文件的路径
Searching for a valid kernel header path...
The path "" is not valid.
Would you like to change it? [yes]
What is the location of the directory of C header files that match your running
kernel?
提示我要输入内核头文件的路径
会出现这种问题有两种情况:
一种是你没有安装内核头文件,那就要先安装.
另外一种情况是vmware的问题,其实kernel header已经安装了,只是没有正确的被识别到
解决办法如下:
1. 运行cd /lib/modules/`uname -r`/build/include/linux
如果没有提示错误信息,ps: uname -r 查看内核版本号
2. 做两个软连接就行了,具体方法是运行下面两条命令
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h
这两条命令给vmwaretools关联了正确的内核头文件的位置
3. 再次执行./vmware-install.pl后,如下所示 :vmware已经可以找到了合法的内核头文件路径,接下来就是继续按enter键了。Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
Searching for a valid kernel header path...
Detected the kernel headers of the running kernel at
"/lib/modules/2.6.38-8-generic/build/include". //cd /lib/modules/`uname -r`/build/include/linux
The path "/lib/modules/2.6.38-8-generic/build/include" appears to be a valid
path to the kernel headers of the running kernel.
Would you like to change it? [no]
--------------------------------------------------------------------------
Enter ,that's ok!
版权声明:本文为博主原创文章,未经博主允许不得转载。 |