What is the path to the kernel headers so I can install vmware?
Solution 1
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!)
Solution 2
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
Solution 3
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
Solution 4
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
Solution 5
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
.
Related videos on Youtube
lionfly
Updated on September 18, 2022Comments
-
lionfly almost 2 years
I use Twitter-OAuth-iPhone to POST tweets by
[_engine sendUpdate:myText];
, which works fine. However, the letter&
in the 'myText' will be changed to&
in the tweet shown on Twitter.com. The&
is for coordinates link:@"http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=%f,+%f"
.I tried to replace the
&
with%%26
in the 'myText', which turns out with%26
in the tweet instead of&
; and when I replace with%26
, the app crash.What code should I use to get
&
(not&
) in the tweet?-
kennytm over 13 yearsCrash? I guess it's a bug of the library.
-
crasic about 13 yearsWhich 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, usingapt-get
is the proper way to solve the issue, you just have to make sure the kernel headers are the right ones. -
Admin about 13 yearsZhe 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
-
Qasim about 11 yearssudo 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 about 11 yearssudo apt-get install build-essential
-
-
lionfly over 13 yearsHi josh thanks, but the code does not get & in the tweet as well. How should I use URL shortener in the code?
-
joshpaul over 13 yearsYou should be able to call out to any of the url shorteners with the url you need to post to twitter, get back a "clean" url, and then post that. See this SO thread for implementation details: stackoverflow.com/questions/2252470/…
-
Wazery about 13 yearsCan you provide me with the name of these headers packages?
-
Wazery about 13 yearslinux-headers-generic is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
-
Scott Severance about 13 yearsI'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, installlinux-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. -
Jason Mock about 11 yearsFYI, I had to do these exact steps to get VMWare Workstation working with Ubuntu 13.04.
-
Mike about 11 yearssudo apt-get install build-essential linux-headers-$(uname -r) worked wonder. Fixed my problem, thx.
-
fixxxer about 11 yearsThank 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
-
youcefb about 11 yearsWorked on 13.04
-
Mark E. Haase about 11 years+1 I was missing build-essentials. This is the best answer here.
-
Griwes about 11 yearsThe fact you need those is retarded - much thanks for this.
-
amateur barista almost 11 yearsZhe'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.
-
Travis Bear almost 11 yearsI used this answer to get VMWare tools running in Linux Mint 15 as well.
-
pepoluan almost 11 yearsThis works! Thank you. My question is: How did you find out what exactly to do?
-
Zhe Li over 10 years@pepoluan some forum posts, read the source code and hundreds of tries :)
-
Mikey T.K. almost 10 yearsThis is STILL a problem as of 14.04. Amazing.
-
JW. almost 10 yearsIf 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: askubuntu.com/a/65314/28555
-
Kayla over 8 yearsThis answer worked on my machine, Debian 8.3 i386
-
dmohr over 6 yearswhen 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.
-
Owl over 5 yearsapt-get install linux-headers-$(uname -r)
-
Scott Severance over 5 years@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.
-
Vanni Totaro over 5 yearsMaybe you need to do a
sudo apt-get update
before the install -
DARKGuy almost 4 yearsThis one plus the build-essentials suggestion from answers above fixed my problem. Thanks!
-
mhucka over 3 yearsEncountered 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.