LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-16-2007, 06:42 PM   #1
sheintze
Member
 
Registered: Jan 2007
Posts: 30

Rep: Reputation: 15
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]
 
Old 03-16-2007, 07:03 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 03-16-2007, 07:14 PM   #3
sheintze
Member
 
Registered: Jan 2007
Posts: 30

Original Poster
Rep: Reputation: 15
What apt-get command to install /usr/src files?

Quote:
Originally Posted by Brian1
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
I don't have that directory. Inside /usr/src is /usr/src/rpm. What apt-get command do I need to use?

I used the netinst cd so it is probably not there.

Thanks,
Siegfried
 
Old 03-16-2007, 07:22 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 03-16-2007, 08:25 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.

Last edited by Quakeboy02; 03-16-2007 at 08:27 PM.
 
Old 03-17-2007, 01:18 AM   #6
eco2geek
Member
 
Registered: Feb 2003
Location: Portland, OR
Distribution: openSUSE 10.3, among others
Posts: 141
Blog Entries: 1

Rep: Reputation: 15
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.)
 
Old 03-17-2007, 04:50 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel header files tristanlee85 Linux - Software 4 07-09-2006 04:42 PM
What!? Kernel header files too old? LinuxLuvr Linux From Scratch 2 06-20-2005 08:43 AM
Kernel Header Files apocolpse SUSE / openSUSE 3 11-19-2004 12:48 PM
Kernel Header Files? kholdstayr Slackware 1 12-22-2003 04:45 PM
where are the kernel header files? vance Linux - Software 5 03-05-2002 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration