Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 01-05-2007, 09:44 AM   #1
LQ Newbie
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Rep: Reputation: 0
Which is the kernel build directory? I Can't find kernel build files

I tried to install ndiswapper but I get the following message

Can't find kernel build files in /lib/modules/2.6.15-1-686/build;

I read in a thread that I should make a sym link like that

ln -s /usr/src/kernels/lib2.6.15-1-686 lib/modules/2.6.15-1-686/build

The problem is there is no /usr/src/kernels/ directory either.
Any suggestions? Which is the kernel build directory?
Old 01-05-2007, 10:41 AM   #2
Senior Member
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
I think this actually means you need to install the source files for your kernel. This is usually provided along with the core files of most distros. On FC6 (Fedora Core 6) the kernel build files reside in


and FC6 stock kernel source is in that directory:


This means that if I want to compile something that needs the kernel source and it cannot find the kernel source by itself, I point it to


in order to get it to compile. This "pointing" can usually be done by specifying the above in a configure statement before "making" of the driver / kernel module you want to compile:

./configure --with-kernel-source-dir=/usr/srckernels/2.6.18-1.2798.fc6-i686

or some similary parameter, depending on how the package you are trying to compile is set up.
Old 01-05-2007, 11:55 AM   #3
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
You can always install it using the Debian package mangement system. Run the following as root:
apt-get update
apt-get install ndiswapper
Also, in Debian, the kernel source is in /usr/src. However, you will need to download the approproate kernel-source and kernel-headers using apt-get.
Old 01-05-2007, 07:05 PM   #4
LQ Newbie
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Original Poster
Rep: Reputation: 0
I use Debian but how can I download kernel-source and kernel-headers? I searched for kernel in aptitude but I found nothing like that
Old 01-05-2007, 07:27 PM   #5
Dutch Master
Senior Member
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Given your kernel version you're on Etch (Testing) Try searching with "linux-source" This
apt-cache search linux-source-`uname -r`
should do the trick. For the headers, do the same but alter the search string
Old 01-08-2007, 04:22 PM   #6
LQ Newbie
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Original Poster
Rep: Reputation: 0
I downloaded the source from
and I copied it in /usr/src directory. then I created a symbolic link.
I run make and everything seemed to go ok but now I have to deal with messages like that

make -C driver
make[1]: Entering directory `/home/grizos/software/ndiswrapper-1.33/driver'
make -C /lib/modules/2.6.15-1-686/build SUBDIRS=/home/grizos/software/ndiswrapper-1.33/driver
make[2]: Entering directory `/usr/src/linux-'

WARNING: Symbol version dump /usr/src/linux-
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.
/bin/sh: scripts/mod/modpost: No such file or directory
make[3]: *** [__modpost] Error 127
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/linux-'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/grizos/software/ndiswrapper-1.33/driver'
make: *** [all] Error 2

Can someone give me a hint? Thanks a lot in advance

Last edited by crabsody; 01-08-2007 at 04:23 PM.
Old 01-09-2007, 04:06 AM   #7
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
What did you download exactly? Which file? Did you use patch?
Because the file is a patch to the file 2.6.15. So to have the (which is also maybe not the same as 2.6.15-1, thats another problem) you need to take the 2.6.15 and then use the to patch it. Its the rule on Missleading for beginners for technically the only solution.

(Also, the proper kernel would be the official one, can be found on )

Last edited by nx5000; 01-09-2007 at 04:11 AM.
Old 01-09-2007, 05:48 AM   #8
LQ Newbie
Registered: Mar 2006
Posts: 15

Rep: Reputation: 0
I have same problem. I need source kernel, but I dont want compile. I have debian etch. Kernel version is 2.6.18-3-686. Where do I find source? Is some easy way, how compile kernel? When I compiled kernel I lost sound, wifi etc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ndiswrapper and Kernel build files.. viciousxp Linux - Kernel 11 09-25-2006 01:58 PM
Anyone know where FC5 kernel build files end up. sass10151 Fedora 8 09-01-2006 01:10 AM
NDISWRAPPER can't find FC5 Kernel build NLawrence Linux - Software 1 05-16-2006 06:55 PM
Missing kernel build files (2.6.11-mdksmp) - need them for ndiswrapper Scyphon Linux - Software 2 04-24-2006 02:59 PM
build error - can't find kernel source PickledHerring Linux - Newbie 1 11-15-2005 08:29 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:05 PM.

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