在vmware平台上使用CentOS-6.9-x86_64-minimal.iso介质操作系统后安装vmtools时报错如下

[root@localhost vmware-tools-distrib]#  ./vmware-install.pl
-bash: ./vmware-install.pl: /usr/bin/perl: bad interpreter: No such file or directory
[root@localhost vmware-tools-distrib]#

查看perl,没有安装

[root@localhost yum.repos.d]#  rpm -q perl
package perl is not installed

处理办法:配置yum安装perl

[root@localhost /]# yum -y install perl
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
DVD                                                                                                               | 4.0 kB     00:00 ...
DVD/primary_db                                                                                                    | 4.7 MB     00:00 ...
Resolving Dependencies
--> Running transaction check
---> Package perl.x86_64 4:5.10.1-144.el6 will be installed
--> Processing Dependency: perl-libs = 4:5.10.1-144.el6 for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(version) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-144.el6.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-144.el6.x86_64
--> Running transaction check
---> Package perl-Module-Pluggable.x86_64 1:3.90-144.el6 will be installed
---> Package perl-Pod-Simple.x86_64 1:3.13-144.el6 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-144.el6.x86_64
---> Package perl-libs.x86_64 4:5.10.1-144.el6 will be installed
---> Package perl-version.x86_64 3:0.77-144.el6 will be installed
--> Running transaction check
---> Package perl-Pod-Escapes.x86_64 1:1.04-144.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
 Package                                   Arch                       Version                              Repository               Size
=========================================================================================================================================
Installing:
 perl                                      x86_64                     4:5.10.1-144.el6                     DVD                      10 M
Installing for dependencies:
 perl-Module-Pluggable                     x86_64                     1:3.90-144.el6                       DVD                      41 k
 perl-Pod-Escapes                          x86_64                     1:1.04-144.el6                       DVD                      33 k
 perl-Pod-Simple                           x86_64                     1:3.13-144.el6                       DVD                     213 k
 perl-libs                                 x86_64                     4:5.10.1-144.el6                     DVD                     579 k
 perl-version                              x86_64                     3:0.77-144.el6                       DVD                      52 k

Transaction Summary
=========================================================================================================================================
Install       6 Package(s)

Total download size: 11 M
Installed size: 36 M
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     41 MB/s |  11 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Pod-Escapes-1.04-144.el6.x86_64                                                                                1/6
  Installing : 4:perl-libs-5.10.1-144.el6.x86_64                                                                                     2/6
  Installing : 1:perl-Module-Pluggable-3.90-144.el6.x86_64                                                                           3/6
  Installing : 1:perl-Pod-Simple-3.13-144.el6.x86_64                                                                                 4/6
  Installing : 3:perl-version-0.77-144.el6.x86_64                                                                                    5/6
  Installing : 4:perl-5.10.1-144.el6.x86_64                                                                                          6/6
  Verifying  : 3:perl-version-0.77-144.el6.x86_64                                                                                    1/6
  Verifying  : 4:perl-libs-5.10.1-144.el6.x86_64                                                                                     2/6
  Verifying  : 4:perl-5.10.1-144.el6.x86_64                                                                                          3/6
  Verifying  : 1:perl-Module-Pluggable-3.90-144.el6.x86_64                                                                           4/6
  Verifying  : 1:perl-Pod-Simple-3.13-144.el6.x86_64                                                                                 5/6
  Verifying  : 1:perl-Pod-Escapes-1.04-144.el6.x86_64                                                                                6/6

Installed:
  perl.x86_64 4:5.10.1-144.el6                                                                                                           

Dependency Installed:
  perl-Module-Pluggable.x86_64 1:3.90-144.el6      perl-Pod-Escapes.x86_64 1:1.04-144.el6      perl-Pod-Simple.x86_64 1:3.13-144.el6     
  perl-libs.x86_64 4:5.10.1-144.el6                perl-version.x86_64 3:0.77-144.el6         

Complete!

附vmtools安装过程

[root@localhost vmware-tools-distrib]#   ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

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

INPUT: [/usr/bin]  default

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

INPUT: [/etc/rc.d]  default

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

INPUT: [/etc/rc.d/init.d]  default

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

INPUT: [/usr/sbin]  default

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

INPUT: [/usr/lib/vmware-tools]  default

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

INPUT: [yes]  default

In which directory do you want to install the common agent library files?
[/usr/lib]

INPUT: [/usr/lib]  default

In which directory do you want to install the common agent transient files?
[/var/lib]

INPUT: [/var/lib]  default

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

INPUT: [/usr/share/doc/vmware-tools]  default

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

INPUT: [yes]  default

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

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]

INPUT: [yes]  default

Initializing...


Making sure services for VMware Tools are stopped.

Found a compatible pre-built module for vmci.  Installing it...


Found a compatible pre-built module for vsock.  Installing it...


The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.

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? [no] yes

INPUT: [yes]

Could not create the '/mnt/hgfs' directory.  Please make sure it is writeable
and/or not currently in use.
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 ]

INPUT: [ Press Enter key to continue ]  default

Found a compatible pre-built module for vmxnet.  Installing it...


The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no] yes

INPUT: [yes]

VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.

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

INPUT: [yes]  default

Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes]

INPUT: [yes]  default

Do you want to enable Common Agent (caf)? [no]

INPUT: [no]  default

No X install found.

Creating a new initrd boot image for the kernel.
Generating the key and certificate files.
Successfully generated the key and certificate files.
vmware-tools start/running
The configuration of VMware Tools 10.3.21 build-14772444 for Linux for this
running kernel completed successfully.

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

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 /usr/bin/vmware-user
2. Log out and log back into your desktop session
3. Restart your X session.

Enjoy,

--the VMware team

[root@localhost vmware-tools-distrib]#

确认vmtools状态

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐