how to properly install kernel source in Debian ?
I used "apt-get install kernel-source-2.5.25", and everything seems fine,
but when I ran some program that needs kernel source, it couldn't detect the path to kernel source directory (I did the same thing in Lindows which is based on Debian and that program could automatically detect the kernel source), I also manually enter the path to the kernel source directory, that I think is "/usr/src", but then it gave so many errors when compiling one more thing is that first, it said something wrong about "cc - command not find", and I use "apt-get install gcc", then it passed that point, but got stuck like what I described so, anyone can suggest some hints for me ? thanks in case u need more information, the program i tried to install is here http://www.nus.edu.sg/vpn/download/n....3.B-k9.tar.gz |
OK, I'm assuming you meant kernel 2.4.25, as 2.5 is an unstable kernel devolpment branch and I don't think its in debian. When you install the kernel source in debian, all apt-get does is download the gziped source to /usr/src. You need to uncompress it there and you'll end up with a directory like /usr/src/kernel-source-2.4.25/ with all the kernel source. You then need to create a symbolic link to that directory named /usr/src/linux, ie "ln -s /usr/src/kernel-source-2.4.25 /usr/src/linux" for the program to know which kernel source to use (its possible to have more than one).
|
You want the kernel-headers-2.4.25-??? not the source anyways, the source package is just a Debianized version of the official kernel sources not a fully configured source tree. Then if a program complains about missing source make sure that you have ln -s /usr/src/kernel-headers-2.4.25-??? /usr/src/linux to have the proper symbolic link. Replace the ??? with the kernel flavor you are running eg. 386,k7, 686 ....
|
but how can I find "kernel-headers-..." , it can't be installed via apt-get ("apt-get install kernel-header"), all i can find there is kernel image and kernel source
thanks |
try apt-cache search kernel-headers with the caveat your /etc/sources.list is appropriate...
If that doesn't get it, google around, or go to debians site and look through either unstable or stable (?) for the answers. Use the site map. U may be able to then download those headers kix_vn has suggested and unzip them with either gunzip (gz extension) or bunzip2 (bz2 extension). A good thing to do would be to apt-get kernel-package, as it includes the bunzip2 and other tools u may need when compiling. Personally I'm using the unstable branch of packages Now my personal experience in trying to create a debian OS to suit my needs was to start fresh with bf2.4 and migrate immediately to 2.6.X and add packages later. that was done by editing my sources.list file and apt-get clean apt-get update apt-get upgrade apt-get dist-upgrade though the apt-get dist-upgrade may eat up the apt-get upgrade (dunno) heres my sources list for unstable, i believe if u are using stable or testing...alls u gotta do is replace unstable with either testing or stable. #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-7 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-6 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-5 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-4 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-3 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-2 (20021218)]/ unstable contrib main non-US/contrib non-US/main #deb cdrom:[Debian GNU/Linux 3.0 r1 _Woody_ - Official i386 Binary-1 (20021218)]/ unstable contrib main non-US/contrib non-US/main deb ftp://ftp.us.debian.org/debian/ unstable main non-free contrib deb-src ftp://ftp.us.debian.org/debian/ unstable main non-free contrib deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free deb-src http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free i hope this helps but dunno, keep on keepin on. U'll get it. Oh yeah dont worry about the cdrom entries, they must be done differently, just try the last uncommented statements. Kool!:newbie: :cool: |
Quote:
Code:
HappyTux:/home/stephen# apt-cache search kernel-headers-2.4.25-* |
yeah, thanks u guys, finally it worked, all I need is to install kernel header in addition to kernel source,
my mistake was that i used "apt-get install kernel-header" instead of "apt-get install kernel-headers" :) |
Link
I never understand this, maybe someone can help
Quote:
|
Re: Link
Quote:
|
All times are GMT -5. The time now is 06:12 PM. |