热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

解决VMwareToolsforLinux安装失败的问题

几天来一直试着安装VmwareToolsforLinux但是每次安装到中途都会遇到同样的问题Unabletocopythesourcefile./installer/services.shtothedestinationfile/etc/vmware-tools.Executionaborted.今天在网上不小心看到一

几天来一直试着安装Vmware Tools for Linux  但是每次安装到中途都会遇到同样的问题

Unable to copy the source file ./installer/services.sh to the destination file
/etc/vmware-tools.

Execution aborted.

今天在网上不小心看到一个网友的回复顿时来了灵感,问题解决!!

首先按照以下方法安装

**************************************************************************************************************

安装Vmwar Tools
选择VM-->install VMware Tools
[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]#mount /dev/cdrom /mnt/cdrom/
[root@localhost ~]# cd /mnt/cdrom/
[root@localhost cdrom]# ls 后有
VMwareTools-6.5.0-118166.i386.rpm
VMwareTools-6.5.0-118166.tar.gz


[root@localhost cdrom]# cp VMwareTools-6.5.0-118166.tar.gz /tmp //拷贝到/tmp下
[root@localhost cdrom]# cd /tmp/
[root@localhost tmp]# tar zxvf VMwareTools-6.5.0-118166.tar.gz //解包文件
[root@localhost tmp]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# ./vmware-install.pl   //安装开始


一路回车之后出现:


What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]
The path "/usr/src/linux/include" is not an existing directory.
查看目录/usr/src/ 根本没有linux这个目录
只有/usr/src/redhat


google/baidu解决方案:
1. 用vmware-any-any-update109打补丁
    很不幸,下载完后,解压 安装出错

[root@localhost vmware-any-any-update109]# ./runme.pl
Unable to open the installer database /etc/vmware/locations in read-mode.

Execution aborted.

2. 继续google:有人说是kernel-source 没有安装
用RPM命令查看一下
[root@localhost ~]# rpm -q kernel-source
package kernel-source is not installed
....
(接下来便是漫长而痛苦又无用的kernel source 安装过程
不写了--因为在这里是无用功—)

3. 第三种方案是安装kernel devel包
先查看内核版本号
[root@localhost ~]# uname -r
2.6.25-14.fc9.i686
[root@localhost ~]# rpm -q kernel-i686-devel
package kernel-xen-devel is not installed

这是i686的内核,所以,要安装对应版本号的 kernel-i686-devel rpm包:

下载地址:http://rpm.pbone.net/index.php3/stat/4/idpl/7201713/com/kernel-devel-2.6.25-14.fc9.i686.rpm.html

安装:
[root@localhost ~]# rpm -ivh kernel-devel-2.6.25-14.fc9.i686.rpm

完成安装后,在/usr/src/下已经多出了一个kernels目录
[root@localhost ~]# cd /usr/src/
[root@localhost src]# ls
kernels redhat

无图无真相,下面是截图

/********************************************************************************************************************************/

/********************************************************************************************************************************/


[root@localhost src]# cd kernels
[root@localhost kernels]# ls
2.6.20-2925.9.fc7.i686.rpm


表明kernel-xen-devel已经装好了
再次使用vmware-install.pl安装,

./vmware-install.pl

就一直enter,装完VMware Tools
(可自动找到配套的the directory of C header files了,哈)

在安装的最后阶段,会出现:
Do you want to change your guest X resolution? (yes/no) [no] y

Please choose one of the following display sizes (1 - 13):

[1] "640x480"
[2]<"800x600"
[3] "1024x768"
[4] "1152x864"
[5] "1280x800"
[6] "1152x900"
[7] "1280x1024"
[8] "1376x1032"
[9] "1400x1050"
[10] "1680x1050"
[11] "1600x1200"
[12] "1920x1200"
[13] "2364x1773"

Please enter a number between 1 and 13:

[3]

重启系统,OK了

*******************************************************************************************************************************

以上转自(版权所有):http://hi.baidu.com/ma_jieo/blog/item/1b19f58bb4a5db729e2fb4fe.html

以下是毕人安装的终端代码

*******************************************************************************************************************************

*******************************************************************************************************************************


[root@Fedora-W tmp]# cd vmware-tools-distrib
[root@Fedora-W vmware-tools-distrib]# ./vmware-install.pl
A previous installation of VMware Tools has been detected.


The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will
first uninstall the currently installed version.  Do you wish to continue?
(yes/no) [yes]

Uninstalling the tar installation of VMware Tools.

The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr] /bin

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts? [/etc]

The file /etc/vmware-tools that this program was about to install already
exists. Overwrite? [yes]

Unable to copy the source file ./installer/services.sh to the destination file
/etc/vmware-tools.

Execution aborted.   //错误一次出现

[root@Fedora-W vmware-tools-distrib]# sudo ./vmware-install.pl
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will
first uninstall the currently installed version.  Do you wish to continue?
(yes/no) [yes]

Uninstalling the tar installation of VMware Tools.

The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts? [/etc]

The file /etc/vmware-tools that this program was about to install already
exists. Overwrite? [yes]

Unable to copy the source file ./installer/services.sh to the destination file
/etc/vmware-tools.

Execution aborted. //错误2次出现

[root@Fedora-W vmware-tools-distrib]# sudo ./vmware-install.pl
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will
first uninstall the currently installed version.  Do you wish to continue?
(yes/no) [yes]

Uninstalling the tar installation of VMware Tools.

The removal of VMware Tools 8.8.0 build-471268 for Linux completed
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/init.d

The path "/etc/init.d" is a directory which does not contain a rc0.d directory.

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/rc1.d

The path "/etc/rc1.d" is a directory which does not contain a rc0.d directory.

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /rc0.d 

The path "/rc0.d" is not an existing directory.

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] rc0.d/

The path "rc0.d" is not an existing directory.

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] /etc/vmware-tools  

The path "/etc/vmware-tools" is a directory which does not contain a rc0.d
directory.

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]


In which directory do you want to install the daemon files?
[/sbin]


In which directory do you want to install the library files?
[/lib/vmware-tools]

The path "/lib/vmware-tools" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the documentation files?
[/doc/vmware-tools]

The path "/doc/vmware-tools" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware Tools 8.8.0 build-471268 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/bin/vmware-config-tools.pl". Do you want this
program to invoke the command for you now? [yes]

Initializing...

Making sure services for VMware Tools are stopped.

Stopping vmware-tools (via systemctl):                     [确定]

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?
[no]

Before you can compile modules, you need to have the following installed...

make
gcc
kernel headers of the running kernel

Searching for GCC...
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]

What is the location of the gcc program on your machine?

The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]

What is the location of the gcc program on your machine?

The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]  no

Searching for a valid kernel header path...
The path "" is not a valid path to the 2.6.40.8-4.fc15.i686.PAE kernel headers.

Would you like to change it? [yes]

Enter the path to the kernel header files for the 2.6.40.8-4.fc15.i686.PAE
kernel?

The path "" is not a valid path to the 2.6.40.8-4.fc15.i686.PAE kernel headers.

Would you like to change it? [yes]  no

WARNING: This program cannot compile any modules for the following reason(s)...

- This program could not find a valid path to the gcc binary.  Please ensure
that the gcc binary is installed on this sytem.

- This program could not find a valid path to the kernel headers of the running
kernel.  Please ensure that the header files for the running kernel are
installed on this sytem.

[ Press Enter key to continue ]

The communication service is used in addition to the standard communication
between the guest and the host.  The rest of the software provided by VMware
Tools is designed to work independently of this feature.
If you wish to have the VMCI 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 ]

The VM communication interface socket family is used in conjunction with the VM
communication interface to provide a new communication path among guests and
host.  The rest of this software provided by VMware Tools is designed to work
independently of this feature.  If you wish to have the VSOCK 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 the Enter key to continue.]

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=pvscsi to override.

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.  Use the flag
--clobber-kernel-modules=vmmemctl to override.

The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
to enable this feature? [yes]

The fast network device driver (vmxnet module) is used only for our fast
networking interface. The rest of the software provided by VMware Tools is
designed to work independently of this feature.
If you wish to have the fast network driver enabled, 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 ]

!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present.  By selecting yes,
you will be enabling this experimental feature.  You can always disable this
feature by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no]

Disabling timer-based audio scheduling in pulseaudio.

Detected X server version 1.10.4

Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
Starting vmware-tools (via systemctl):                     [确定]
The configuration of VMware Tools 8.8.0 build-471268 for Linux for this running
kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking "/bin/vmware-toolbox-cmd" from the
command line or by invoking "/bin/vmware-toolbox" from the command line during
an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

[root@Fedora-W vmware-tools-distrib]#

兴奋之余上个图:
 到此成功安装!欢迎交流!


推荐阅读
  • 本题来自WC2014,题目编号为BZOJ3435、洛谷P3920和UOJ55。该问题描述了一棵不断生长的带权树及其节点上小精灵之间的友谊关系,要求实时计算每次新增节点后树上所有可能的朋友对数。 ... [详细]
  • 嵌入式开发环境搭建与文件传输指南
    本文详细介绍了如何为嵌入式应用开发搭建必要的软硬件环境,并提供了通过串口和网线两种方式将文件传输到开发板的具体步骤。适合Linux开发初学者参考。 ... [详细]
  • 本文详细介绍了如何在预装Ubuntu系统的笔记本电脑上安装Windows 7。针对没有光驱的情况,提供了通过USB安装的具体方法,并解决了分区、驱动器无法识别等问题。 ... [详细]
  • 解决TensorFlow CPU版本安装中的依赖问题
    本文记录了在安装CPU版本的TensorFlow过程中遇到的依赖问题及解决方案,特别是numpy版本不匹配和动态链接库(DLL)错误。通过详细的步骤说明和专业建议,帮助读者顺利安装并使用TensorFlow。 ... [详细]
  • Linux中的yum安装软件
    yum俗称大黄狗作用:解决安装软件包的依赖关系当安装依赖关系的软件包时,会将依赖的软件包一起安装。本地yum:需要yum源,光驱挂载。yum源:(刚开始查看yum源中的内容就是上图 ... [详细]
  • JSOI2010 蔬菜庆典:树结构中的无限大权值问题
    本文探讨了 JSOI2010 的蔬菜庆典问题,主要关注如何处理非根非叶子节点的无限大权值情况。通过分析根节点及其子树的特性,提出了有效的解决方案,并详细解释了算法的实现过程。 ... [详细]
  • 目录一、salt-job管理#job存放数据目录#缓存时间设置#Others二、returns模块配置job数据入库#配置returns返回值信息#mysql安全设置#创建模块相关 ... [详细]
  • 如何清除Chrome浏览器地址栏的特定历史记录
    在使用Chrome浏览器时,你可能会发现地址栏保存了大量浏览记录。有时你可能希望删除某些特定的历史记录而不影响其他数据。本文将详细介绍如何单独删除地址栏中的特定记录以及批量清除所有历史记录的方法。 ... [详细]
  • 利用Selenium与ChromeDriver实现豆瓣网页全屏截图
    本文介绍了一种使用Selenium和ChromeDriver结合Python代码,轻松实现对豆瓣网站进行完整页面截图的方法。该方法不仅简单易行,而且解决了新版Selenium不再支持PhantomJS的问题。 ... [详细]
  • 本文介绍如何使用PHP在WordPress中根据分类类别ID或名称获取所有相关文章,提供详细的方法和代码示例。 ... [详细]
  • 本文详细介绍了在XAMPP环境中如何修改Apache和MySQL的默认端口号,并确保WordPress能够正常访问。同时,提供了针对Go语言社区和Golang开发者的相关建议。 ... [详细]
  • 探索新一代API文档工具,告别Swagger的繁琐
    对于后端开发者而言,编写和维护API文档既繁琐又不可或缺。本文将介绍一款全新的API文档工具,帮助团队更高效地协作,简化API文档生成流程。 ... [详细]
  • 深入解析Serverless架构模式
    本文将详细介绍Serverless架构模式的核心概念、工作原理及其优势。通过对比传统架构,探讨Serverless如何简化应用开发与运维流程,并介绍当前主流的Serverless平台。 ... [详细]
  • #print(34or4 ... [详细]
  • CSS高级技巧:动态高亮当前页面导航
    本文介绍了如何使用CSS实现网站导航栏中当前页面的高亮显示,提升用户体验。通过为每个页面的body元素添加特定ID,并结合导航项的类名,可以轻松实现这一功能。 ... [详细]
author-avatar
骨Zi骄傲
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有