Where are kernel header files?
I'm running debian etch RC4 in VMWare on top of windows. As part of VMware, one is supposed to install something called vmware-tools.
The installation script for vmware tools is posing the question below. I checked and don't have such a directory. How should I respond to this question? Thanks, Siegfried --------------------------------------------------------------------------- What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include] |
Not sure of Debian installs but kernel sources are installed in /usr/src and then go by kernel name from there. Example
/usr/src/linux-2.6.20/include Might search to see if Debian installs kernel source during the install. If not then more than likely it is on the install cds. Brian |
What apt-get command to install /usr/src files?
Quote:
I used the netinst cd so it is probably not there. Thanks, Siegfried |
I would say on Debian site the file for matching the kernel that is running will be there to install. To find kernel version run the command ' uname -r '.
Brian |
Kernel sources, by definition are at /lib/modules/`uname -r`/source/include. However, if you didn't compile the kernel yourself, then there is no-one at that address. What you have to do is install the linux-headers package for your kernel. Probably "linux-headers-2.6.18-3", since it's etch.
|
Headers and source are two different packages.
To install the kernel headers, you can apt-get install linux-headers-`(uname -r)` and they'll be installed in /usr/src/linux-headers-<your_kernel_version>. (If, for example, you want to use the proprietary nvidia installer, you'll need the headers.) To get the source for the entire kernel, you can apt-get install linux-source and apt will grab the source for your currently running kernel. Installing this package just dumps a tarball (for example, "linux-source-2.6.18.tar.bz2") into /usr/src. You have to extract it yourself. (If, for example, you want to recompile your kernel, you'll need the sources.) |
The headers get installed in /usr/src/linux-headers-xxxx. Follow eco2geek's first sample command. There will actually be two packages installed, one called "linux-headers-2.6.18" the other called "linux-headers-2.6.18-xxxx", the latter depends on the current running kernel.
The headers are used to compile drivers against the current running kernel, the source is used for compiling a kernel, (normally). |
All times are GMT -5. The time now is 01:00 AM. |