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.

4
  • 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, 2011 at 22:12
  • 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
    – user19092
    Jun 1, 2011 at 13:47
  • 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, 2013 at 2:14
  • sudo apt-get install build-essential
    – Qasim
    Apr 27, 2013 at 2:15

8 Answers 8

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!)

12
  • 8
    FYI, I had to do these exact steps to get VMWare Workstation working with Ubuntu 13.04.
    – Jason Mock
    Apr 22, 2013 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 4, 2013 at 22:20
  • 3
    The fact you need those is retarded - much thanks for this.
    – Griwes
    Jun 28, 2013 at 15:38
  • 3
    This works! Thank you. My question is: How did you find out what exactly to do?
    – pepoluan
    Sep 11, 2013 at 12:57
  • 4
    This is STILL a problem as of 14.04. Amazing.
    – Mikey T.K.
    Sep 18, 2014 at 1:27
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

1
  • This answer worked on my machine, Debian 8.3 i386
    – Kayla
    Feb 6, 2016 at 15:10
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
2
  • sudo apt-get install build-essential linux-headers-$(uname -r) worked wonder. Fixed my problem, thx.
    – Mike
    May 17, 2013 at 22:27
  • +1 I was missing build-essentials. This is the best answer here. Jun 20, 2013 at 22:18
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 
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.

4
  • Can you provide me with the name of these headers packages?
    – Wazery
    May 8, 2011 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. May 8, 2011 at 17:42
  • apt-get install linux-headers-$(uname -r)
    – Owl
    Feb 24, 2019 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. Feb 24, 2019 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"

1
  • This one plus the build-essentials suggestion from answers above fixed my problem. Thanks!
    – DARKGuy
    Aug 18, 2020 at 23:39
5

CTRL+ALT+t

sudo apt-get install linux-headers-generic

2
  • 3
    linux-headers-generic is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    – Wazery
    May 8, 2011 at 17:25
  • Maybe you need to do a sudo apt-get update before the install Feb 26, 2019 at 11:11
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .