2 Replies Latest reply on Oct 4, 2011 1:09 PM by mpasqual

    Cannot install vmware-tools on kernel 2.6.39

    scoutnet Novice



      I am not sure if this is the right place to post this question, but I need to know the answer ASAP since we have to decide what guest kernel we will use for our next product soon.  My situation is I am running ESXi 4.1 and put down linux kernel 2.6.39 on my guest machine.  When I installed vmware-tools I got this error:


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




      kernel headers of the running kernel



      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]

      ^CExecution aborted.


      I installed both kernel-headers and kernel-devel so it should have detected the kernel header path.  I even tried to specify the path when it prompted users to enter at the prompt and the same result.  When I switched to kernel 2.6.31 on the guest machine I had no problem installing vmware-tools.  With 2.6.31 I've changed the path to  /usr/src/kernels/ and it could not detect the path (because of XXX I added in the path) so I manually specifed the path at the prompt and it worked still.


      Please help. I'd greatly appreciate.



        • 1. Re: Cannot install vmware-tools on kernel 2.6.39
          golddiggie Virtuoso

          Which Linux distro is this?


          I've had solid sucess using YUM to install all the kerel devel/header items... You could be missing one component that's screwing the pooch there. Have you tried logging off, then back on and trying again?


          I've not had any issue with installing the tools from ESXi 4.1 onto CentOS through the latest version 5 release (updated to the latest via YUM)... I plan on setting up a CentOS 6 VM soon to see how it compares (for my needs). I'm evaluating ESXi 5 now, so I'll be installing the tools from that release onto the VM...

          • 2. Re: Cannot install vmware-tools on kernel 2.6.39
            mpasqual Novice

            Hi scountnet,

            I just figured out a similar issue yesterday with one of my older Debian Linux guests; not sure if that's the distro you're working with, but perhaps the steps will help you figure things out anyway:


                 1. Log into the console as root

                 2. Check the kernel version:

            # uname –r

            which in this case is 2.6.26-2-686

                 3. Install the appropriate headers for the installed kernel:

            # apt-get install linux-headers-2.6.26-2-686

                 4. Attach the VMware tools cdrom ISO (or just choose to install it on the guest and it will automatically attach the ISO)

                 5. Mount the cd into linux:

            # mount /dev/cdrom1

                 6. Copy the installer to a temporary location

            # cp /media/cdrom0/VMwareTools-8.3.7-433358.tar.gz ~

                 7. Go to the temporary location:

            # cd ~

                 8. Decompress and untar the installer:

            # tar –xzf VMwareTools-8.3.7-433358.tar.gz

                 9. Delete the original file:

            # rm VMwareTools-8.3.7-433358.tar.gz

                 10. Go to the installer location:

            # cd vmware-tools-distrib

                 11. Link the headers file to the right location for the VMware Tools installer:

            # ln -s /usr/src/linux-headers-2.6.26-2-686 /usr/src/linux

                 12. Change the gcc version to use:

            # export CC=/usr/bin/gcc-4.1

                 13. Start the installer:

            # ./vmware-install.pl

                 14. Accept all the defaults all the way through.

                 15. Delete the installer folder:

            # rm –rf vmware-tools-distrib

                 16. And you’re done!


            This is based on instructions I found here: http://www.visoracle.com/vm/debian40/installvmwaretools.html


            Good luck!