95

I installed the VMware bundle on my Ubuntu 11.04 successfully but when I open it it gives me this window

enter image description here

and I don't know the path to this C headers.

Braiam
  • 67,791
  • 32
  • 179
  • 269
Wazery
  • 1,546
  • 1
    Which Kernel are you using (check with uname -a). Because with the 11.04 upgrade ubuntu silently switched my kernel from linux-generic to linux-generic-pae without installing the relevant headers, which uses a different set of linux headers. As per the three responses below, using apt-get is the proper way to solve the issue, you just have to make sure the kernel headers are the right ones. – crasic May 19 '11 at 22:12
  • 2
    sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h – Qasim Apr 27 '13 at 02:14
  • sudo apt-get install build-essential – Qasim Apr 27 '13 at 02:15
  • 2
    Zhe seems to be on the right track, but still something missing. Creating those links helps to get past the prompt for the 2.6.38.8_generic kernel headers, but then when I run VMWare Workstation (6.5.5) I get an error saying "Unable to build kernel modules. See logfile /tmp/vmware-root/setup-22414.log", and when I look in the log file it just describes the build attempt, but shows no errors, which is weird. So I tried to go the short route and reinstall from the bundle to see if doing that after creating the links solved the problem. It did not. I'm stuck. Any ideas? I thought that combining t –  Jun 01 '11 at 13:47

8 Answers8

107
cd /lib/modules/$(uname -r)/build/include/linux
sudo ln -s ../generated/utsrelease.h
sudo ln -s ../generated/autoconf.h
sudo ln -s ../generated/uapi/linux/version.h 

After adding the symlink, the path is /usr/src/linux-headers-$(uname -r)/include (Thanks @Kariem!)

Zhe Li
  • 1,186
  • 8
    FYI, I had to do these exact steps to get VMWare Workstation working with Ubuntu 13.04. – Jason Mock Apr 22 '13 at 20:53
  • 9
    Thank you! Just to be clear, as I did not read that from the answer: after adding the symlink, the path is /usr/src/linux-headers-$(uname -r)/include – Kariem Jun 04 '13 at 22:20
  • Worked on 13.04 – Akber Choudhry Jun 18 '13 at 14:00
  • 3
    The fact you need those is retarded - much thanks for this. – Griwes Jun 28 '13 at 15:38
  • Zhe's answer + Kariem's comment are invaluable. This solved the "Unable to update runtime folder sharing status: There was an error mounting Shared Folders file system inside the guest operating system." error for me in Ubuntu 13.04. – amateur barista Jul 16 '13 at 16:01
  • I used this answer to get VMWare tools running in Linux Mint 15 as well. – Travis Bear Jul 23 '13 at 18:19
  • 3
    This works! Thank you. My question is: How did you find out what exactly to do? – pepoluan Sep 11 '13 at 12:57
  • 2
    @pepoluan some forum posts, read the source code and hundreds of tries :) – Zhe Li Nov 01 '13 at 14:02
  • 4
    This is STILL a problem as of 14.04. Amazing. – Mikey T.K. Sep 18 '14 at 01:27
  • If you try the solution in this answer and are getting 'No such file or directory' errors after attempting to 'cd', then @manikandan's answer below helps. After installing the headers, that directory should exist. See: http://askubuntu.com/a/65314/28555 – JW. Sep 26 '14 at 13:35
  • when facing this issue on centos 7 (I know, this is an ubuntu site, but google brought me here and it was helpful), I had to yum install kernel-devel first, then complete the steps outlined by Zhe, then the include dir was found in /usr/src/kernels/$(uname -r)/include. – dmohr Jan 23 '18 at 19:32
  • Encountered similar problem trying to install VMware tools in an old ESXi vSphere 5.x system and CentOS 7.9. Same solution. Mentioning it here in case others are struggling with a similar combination. – mhucka Nov 25 '20 at 16:02
50

Below commands are very helpful for you:

Step 1 : Ctrl + Alt + T

Step 2 : sudo apt-get install linux-headers-$(uname -r)

Step 3 : The path to the kernel headers is then /usr/src/linux-headers-$(uname -r)/include

20

Before installing Vmware Workstation you need to install build-essential and linux headers

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

and then

 sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

Done thats it, install Vmware Workstation now

 path to vm# sh Vm***.bundle
pst007x
  • 8,052
Qasim
  • 22,092
12

There are a few files in locations that the installer doesn't expect, I run this and it works:

ifrantz@ifrantz:~$ cat ~/update_version.sh 
#!/bin/bash

cd /lib/modules/$(uname -r)/build/include/linux
sudo ln -s ../generated/utsrelease.h
sudo ln -s ../generated/autoconf.h
sudo ln -s ../generated/uapi/linux/version.h 
Eric Carvalho
  • 54,385
8

My first guess is that you haven't installed the headers. You need to install the appropriate linux-headers package. Most likely, you need to install linux-headers-generic. However, if if you're running some kernel other than linux-generic, install the linux-headers package for that kernel.

If you've already installed the headers, they should be in /usr/src.

  • Can you provide me with the name of these headers packages? – Wazery May 08 '11 at 14:50
  • 1
    I'm not sure exactly what you're asking. You can search in Synaptic to find out what you're running on your machine. Most likely, your kernel is linux-generic. If so, install linux-headers-generic, which will pull in the proper packages as dependencies. The exact headers package (and paths in the filesystem) change with each kernel update. Look on your system to find out which is in use. – Scott Severance May 08 '11 at 17:42
  • apt-get install linux-headers-$(uname -r) – Owl Feb 24 '19 at 20:28
  • @owl, The problem with that is you'll have to reinstall the headers every time the version changes. If you install the basic linux-headers package, it's always up to date. – Scott Severance Feb 24 '19 at 22:25
7

Problem can be solved in two steps, after installing vmware workstation 9.X.X (in terminal):

  1. sudo apt-get install gcc

  2. sudo vmware-modconfig --console --install-all --appname="VMware Player" --icon="vmware-player"

BuZZ-dEE
  • 14,223
user152790
  • 71
  • 1
  • 2
5

CTRL+ALT+t

sudo apt-get install linux-headers-generic

Vanni Totaro
  • 2,043
4

Had the same issue, I was running kernel 3.2.0-29 but only had linux-headers-3.2.0-35 in /usr/src/

user@ubuntu:/usr/src$ ls -l
drwxr-xr-x 24 root root 4096 Jan  5 11:17 linux-headers-3.2.0-35
drwxr-xr-x  7 root root 4096 Jan  5 11:17 linux-headers-3.2.0-35-generic

user@ubuntu:/usr/src/linux-headers-3.2.0-35/include$ uname -a

Linux ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_6                                                                                4 x86_64 x86_64 GNU/Linux

user@ubuntu:/usr/src$ sudo apt-get install linux-headers-3.2.0-29-generic

user@ubuntu:/usr/src/$ cd /tmp/vmware-tools-distrib
user@ubuntu:/tmp/vmware-tools-distrib$ sudo ./vmware-install.pl
<kept hitting enter>

Enjoy, --the VMware team

done and done
Psytek7
  • 41