VMWare: The path “/usr/bin/gcc” is not valid path to the gcc binary

Since I’ve wasted way too much time with this problem, I thought I’d share how I solved it…

But first the problem:

I wanted to install the vmware tools in a Debian Squeeze virtual machine. So I chose Install VMWare Tools in VMWare Workstation. Then mounted the CD:

mount /dev/cdrom

Unpacked the tools to the /tmp directory:

cd /tmp
tar xvfz /media/cdrom0/VMwareTools-8.8.4-743747.tar.gz

I then started the tools installation:

cd vmware-tools-distrib/

Most of it went fine but I reached the point where the installer looks for gcc and got the following message:

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

I said yes, looked for the path to gcc and saw it wasn’t installed. So I stopped the installer and installed gcc:

# apt-get install gcc

I restarted the installer and same problem… I now checked the path to gcc:

# which gcc

And entered it at the prompt:

What is the location of the gcc program on your machine? /usr/bin/gcc

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

So gcc is now there but somehow the tools installer doesn’t like it.

After googling for ages, I ended up installing the following packages:

  • make
  • gcc-4.3
  • libglib2.0-0
  • linux-headers-2.6.32-5-amd64

Of course if you have another kernel, you should install the appropriate version of the Linux kernel headers. You can install it all like this:

aptitude install make gcc-4.3 linux-headers-`uname -r` libglib2.0-0

gcc-4.3 is required and not the version 4.4 which got installed when I ran apt-get install gcc because it’s the version which was used to compile the kernel. You can check this on your system using:

# cat /proc/version
Linux version 2.6.32-5-amd64 (Debian 2.6.32-45) (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 04:00:17 UTC 2012

After that the installation of the vmware tools was at last successful.

I’m not 100% sure that all 4 packages are needed but in the end after installing all 4 it worked and I really don’t want to test the different combination with 3 packages to see whether I could have installed one package less.

9 thoughts on “VMWare: The path “/usr/bin/gcc” is not valid path to the gcc binary

  1. Thank you Henri, I had the same problem installing VMware Tools in my Debian Wheezy install, but after following your instructions I was able to fix the “gcc problem”.


  2. Thank you very much. I had the same problem and while I had seen some of the commands round and about I loved the clear explanation.

  3. It works!

    I tried installing:


    but it doesn’t work. When I looked at my linux version on /proc/version and then installed the linux-headers-X.X.X-version worked for me!

    Thanks man!

  4. Great tips. Thank you very much.

    if you receive following messages:

    Searching for a valid kernel header path…
    The path “” is not a valid path to the 3.2.0-4-amd64 kernel headers.
    Would you like to change it? [yes]
    The solution to this is to install the necessary kernel headers and re-run the vmware-tools install script.

    sudo apt-get update
    sudo apt-get install build-essential
    sudo apt-get install linux-headers-$(uname -r)


Leave a Reply

Your email address will not be published.