In virtualization, VMware tools are a crucial component for enhancing the performance of virtual machines. However, installing these tools on CentOS and RHEL can sometimes result in an error, leaving many users puzzled and seeking solutions. The error message typically reads, “Searching for a valid kernel header path… The path ” is not valid. Would you like to change it? [yes]”.
Searching for a valid kernel header path... The path "" is not valid. Would you like to change it? [yes]
This error usually occurs when your server lacks the necessary dependencies or any required compiler.
To rectify this, you need to install the required dependencies.
Install Required Dependencies
The first step to resolving this error is to install the necessary dependencies. This can be achieved by running the following command:
yum -y install gcc make perl kernel-headers kernel-devel
This command instructs the package manager, yum, to install the gcc, make, perl, kernel-headers, and kernel-devel packages. These packages are essential for the successful installation of VMware tools.
Example:
[root@centos6 ~]# yum install gcc make perl kernel-headers kernel-devel -y Loaded plugins: fastestmirror base | 3.7 kB 00:00 http://ossm.utm.my/centos/6.5/os/x86_64/repodata/617a880b84a87969e04bfeebb1b96d5f441da42ee931d374fa6b6d57decd821e-primary.sqlite.bz2: [Errno 12] Timeout on http://ossm.utm.my/centos/6.5/os/x86_64/repodata/617a880b84a87969e04bfeebb1b96d5f441da42ee931d374fa6b6d57decd821e-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds') Trying other mirror. base/primary_db | 4.4 MB 00:49 extras | 3.4 kB 00:00 extras/primary_db | 18 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 65 kB 00:00 Setting up Install Process Package 1:make-3.81-20.el6.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package gcc.x86_64 0:4.4.7-4.el6 will be installed --> Processing Dependency: libgomp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64 --> Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-4.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-4.el6.x86_64 --> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-4.el6.x86_64 ---> Package kernel-devel.x86_64 0:2.6.32-431.el6 will be installed ---> Package kernel-headers.x86_64 0:2.6.32-431.el6 will be installed ---> Package perl.x86_64 4:5.10.1-136.el6 will be installed --> Processing Dependency: perl-libs = 4:5.10.1-136.el6 for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-136.el6.x86_64 --> Running transaction check ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 ---> Package cpp.x86_64 0:4.4.7-4.el6 will be installed --> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-4.el6.x86_64 ---> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be installed --> Processing Dependency: glibc-headers = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6.x86_64 ---> Package libgomp.x86_64 0:4.4.7-4.el6 will be installed ---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6 will be installed ---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6.x86_64 ---> Package perl-libs.x86_64 4:5.10.1-136.el6 will be installed ---> Package perl-version.x86_64 3:0.77-136.el6 will be installed --> Running transaction check ---> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be installed ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed ---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6 will be installed ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: gcc x86_64 4.4.7-4.el6 base 10 M kernel-devel x86_64 2.6.32-431.el6 base 8.7 M kernel-headers x86_64 2.6.32-431.el6 base 2.8 M perl x86_64 4:5.10.1-136.el6 base 10 M Installing for dependencies: cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k cpp x86_64 4.4.7-4.el6 base 3.7 M glibc-devel x86_64 2.12-1.132.el6 base 978 k glibc-headers x86_64 2.12-1.132.el6 base 608 k libgomp x86_64 4.4.7-4.el6 base 118 k mpfr x86_64 2.4.1-6.el6 base 157 k perl-Module-Pluggable x86_64 1:3.90-136.el6 base 40 k perl-Pod-Escapes x86_64 1:1.04-136.el6 base 32 k perl-Pod-Simple x86_64 1:3.13-136.el6 base 212 k perl-libs x86_64 4:5.10.1-136.el6 base 578 k perl-version x86_64 3:0.77-136.el6 base 51 k ppl x86_64 0.10.2-11.el6 base 1.3 M Transaction Summary ==================================================================================================== Install 16 Package(s) Total download size: 40 M Installed size: 98 M Downloading Packages: (1/16): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00 (2/16): cpp-4.4.7-4.el6.x86_64.rpm | 3.7 MB 00:42 (3/16): gcc-4.4.7-4.el6.x86_64.rpm | 10 MB 01:40 (4/16): glibc-devel-2.12-1.132.el6.x86_64.rpm | 978 kB 00:09 (5/16): glibc-headers-2.12-1.132.el6.x86_64.rpm | 608 kB 00:06 (6/16): kernel-devel-2.6.32-431.el6.x86_64.rpm | 8.7 MB 01:25 (7/16): kernel-headers-2.6.32-431.el6.x86_64.rpm | 2.8 MB 00:30 (8/16): libgomp-4.4.7-4.el6.x86_64.rpm | 118 kB 00:01 (9/16): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:01 (10/16): perl-5.10.1-136.el6.x86_64.rpm | 10 MB 01:35 (11/16): perl-Module-Pluggable-3.90-136.el6.x86_64.rpm | 40 kB 00:00 (12/16): perl-Pod-Escapes-1.04-136.el6.x86_64.rpm | 32 kB 00:00 (13/16): perl-Pod-Simple-3.13-136.el6.x86_64.rpm | 212 kB 00:01 (14/16): perl-libs-5.10.1-136.el6.x86_64.rpm | 578 kB 00:05 (15/16): perl-version-0.77-136.el6.x86_64.rpm | 51 kB 00:00 (16/16): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:11 ---------------------------------------------------------------------------------------------------- Total 103 kB/s | 40 MB 06:35 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Importing GPG key 0xC105B9DE: Userid : CentOS-6 Key (CentOS 6 Official Signing Key)Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : 1:perl-Pod-Escapes-1.04-136.el6.x86_64 1/16 Installing : 4:perl-libs-5.10.1-136.el6.x86_64 2/16 Installing : 1:perl-Pod-Simple-3.13-136.el6.x86_64 3/16 Installing : 3:perl-version-0.77-136.el6.x86_64 4/16 Installing : 1:perl-Module-Pluggable-3.90-136.el6.x86_64 5/16 Installing : 4:perl-5.10.1-136.el6.x86_64 6/16 Installing : ppl-0.10.2-11.el6.x86_64 7/16 Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 8/16 Installing : mpfr-2.4.1-6.el6.x86_64 9/16 Installing : cpp-4.4.7-4.el6.x86_64 10/16 Installing : libgomp-4.4.7-4.el6.x86_64 11/16 Installing : kernel-headers-2.6.32-431.el6.x86_64 12/16 Installing : glibc-headers-2.12-1.132.el6.x86_64 13/16 Installing : glibc-devel-2.12-1.132.el6.x86_64 14/16 Installing : gcc-4.4.7-4.el6.x86_64 15/16 Installing : kernel-devel-2.6.32-431.el6.x86_64 16/16 Verifying : 1:perl-Module-Pluggable-3.90-136.el6.x86_64 1/16 Verifying : kernel-headers-2.6.32-431.el6.x86_64 2/16 Verifying : cpp-4.4.7-4.el6.x86_64 3/16 Verifying : glibc-devel-2.12-1.132.el6.x86_64 4/16 Verifying : 1:perl-Pod-Escapes-1.04-136.el6.x86_64 5/16 Verifying : libgomp-4.4.7-4.el6.x86_64 6/16 Verifying : 4:perl-5.10.1-136.el6.x86_64 7/16 Verifying : mpfr-2.4.1-6.el6.x86_64 8/16 Verifying : 4:perl-libs-5.10.1-136.el6.x86_64 9/16 Verifying : 1:perl-Pod-Simple-3.13-136.el6.x86_64 10/16 Verifying : kernel-devel-2.6.32-431.el6.x86_64 11/16 Verifying : gcc-4.4.7-4.el6.x86_64 12/16 Verifying : 3:perl-version-0.77-136.el6.x86_64 13/16 Verifying : ppl-0.10.2-11.el6.x86_64 14/16 Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 15/16 Verifying : glibc-headers-2.12-1.132.el6.x86_64 16/16 Installed: gcc.x86_64 0:4.4.7-4.el6 kernel-devel.x86_64 0:2.6.32-431.el6 kernel-headers.x86_64 0:2.6.32-431.el6 perl.x86_64 4:5.10.1-136.el6 Dependency Installed: cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-4.el6 glibc-devel.x86_64 0:2.12-1.132.el6 glibc-headers.x86_64 0:2.12-1.132.el6 libgomp.x86_64 0:4.4.7-4.el6 mpfr.x86_64 0:2.4.1-6.el6 perl-Module-Pluggable.x86_64 1:3.90-136.el6 perl-Pod-Escapes.x86_64 1:1.04-136.el6 perl-Pod-Simple.x86_64 1:3.13-136.el6 perl-libs.x86_64 4:5.10.1-136.el6 perl-version.x86_64 3:0.77-136.el6 ppl.x86_64 0:0.10.2-11.el6 Complete!
Commands Mentioned
- yum -y install gcc make perl kernel-headers kernel-devel – This command installs the gcc, make, perl, kernel-headers, and kernel-devel packages, which are necessary for the installation of VMware tools.
Conclusion
In conclusion, the “Failed to Install VMware Tools” error is a common issue encountered by users trying to install VMware tools on CentOS and RHEL. This error is typically due to the absence of necessary dependencies or required compilers on your server. By following the steps outlined in this guide, you can easily rectify this issue and ensure a successful installation of VMware tools.
Remember, understanding the root cause of the problem and knowing how to fix it not only helps you resolve the current issue but also equips you with the knowledge to prevent similar issues in the future.
Happy troubleshooting!
FAQs
-
What are VMware tools and why are they important?
VMware tools are a suite of utilities that enhance the performance of the virtual machine’s guest operating system and improve management of the virtual machine. They are crucial for improving the interaction between the host and guest operating systems, enabling better performance and usability of the virtual machine.
-
Why does the “Failed to Install VMware Tools” error occur?
The “Failed to Install VMware Tools” error typically occurs when your server lacks the necessary dependencies or any required compiler for the installation of VMware tools. These dependencies are essential for the tools to interact properly with the system’s kernel.
-
What does the command ‘yum -y install gcc make perl kernel-headers kernel-devel’ do?
This command instructs the package manager, yum, to install the gcc, make, perl, kernel-headers, and kernel-devel packages. These packages are essential for the successful installation of VMware tools as they provide the necessary components for compiling and building new modules that can interact with your server’s kernel.
-
What is the role of kernel headers and kernel development packages in this process?
Kernel headers and kernel development packages provide the necessary files and functions for compiling and building new modules that can interact with your server’s kernel. They are crucial for the VMware tools installation process as they allow the tools to integrate properly with the system’s kernel.
-
What is the significance of the ‘yum’ command in Linux?
Yum, which stands for Yellowdog Updater, Modified, is a package manager that helps users to install, update, and remove software packages in Linux distributions. It automatically resolves dependencies and provides an easy way to manage packages, making it an essential tool for maintaining and updating Linux systems.