LinuxQuestions.org
Visit Jeremy's Blog.
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 01-17-2005, 12:08 PM   #1
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Rep: Reputation: 15
re-compiling issues


I admit that I'm completely clueless when it comes to linux, but I'm trying.
I'm attempting to recompile the kernel using the sticky at the top of this forum, but everytime I try I get this error:

"E: Couldn't find package kernel-source-2.6.8-1-386"

Where do I get these files?
 
Old 01-17-2005, 01:19 PM   #2
fatman
Member
 
Registered: Mar 2003
Location: PA
Distribution: Ubuntu (x2)
Posts: 158

Rep: Reputation: 30
The package i used (on sarge):
"apt-get install kernel-source-2.6.8"

Which packages are availabkle depends on which version you are using (unstable=Sid, testing=Sarge, stable=Woody)
Here's a way to find what kernel sources are available:
"apt-cache search kernel-source | grep 2.6"

Alternatively, you can poke through the packages here:
http://www.debian.org/distrib/packages
 
Old 01-17-2005, 01:24 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Just a not theres no reason to push the search through grep, thats just serious overkill.

apt-cache search kernel-source-2.6

Will work just as well.
 
Old 01-17-2005, 01:56 PM   #4
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Original Poster
Rep: Reputation: 15
do I need to be connected to the internet for that, cause it doesn't seem to do anything when I enter that command. I'm using sarge with kernel version 2.6.8-1-386 and the whole reason I am re-compiling the kernel can be found here:

Wireless
 
Old 01-17-2005, 02:16 PM   #5
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
The kernel source should be available from either the internet or the CD's if thats where you got the original image.

apt-cache will work without the internet.
 
Old 01-17-2005, 03:11 PM   #6
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Rep: Reputation: 15
You need to switch to root mode.
First type: "su" [and hit enter]
password [type root's password]

and than: "apt-cache search..."
 
Old 01-17-2005, 03:19 PM   #7
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Original Poster
Rep: Reputation: 15
i must be an idiot because the apt-cache command isn't doing a thing.
Every time I use the "apt-get install kernel-source-2.6.8" command I get this:

"Package kernel-source-2.6.8 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or is only available from another source.

E: Package kernel-source-2.6.8 has no installation candidate"

I have the install cd #1 in and have also downloaded the kernel-source-2.6.8_2.6.8-12_all.deb package.
What am I doing wrong?
 
Old 01-17-2005, 04:44 PM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Maybe you didn't download the CD with the kernel-source on? It should work through the internet though. what does your /etc/apt/sources.list file look like?

to install a deb file directly you need to use dpkg program:

dpkg -i kernel-source-2.6.8_2.6.8-12_all.deb
 
Old 01-17-2005, 05:00 PM   #9
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Apt-cache search is telling you it is unavailable because apt isn't seeing it. If you can get a wired connection, you can get a list of available packages from the internet. The packages that apt sees are from what is in the file /etc/apt/sources.list. The sources.list file for Sarge should be something like:
Code:
deb ftp://ftp.debian.org/debian testing main contrib non-free
#deb-src ftp://ftp.debian.org/debian testing main contrib non-free

deb ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
#deb-src ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

deb ftp://security.debian.org/debian-security testing/updates main contrib non-free
#deb-src ftp://security.debian.org/debian-security testing/updates main contrib non-free
If you have that file and a working connection, you can run
Code:
apt-get update
to get a list of available packages.

Since you need the kernel source to get networking up, you may have to download the sources from another computer and transfer them. You can download the source file here: http://packages.debian.org/unstable/...l-source-2.6.8 Click on the "all" button to select a mirror and download the file. It will be a deb file with a name: <package name>.deb Transfer that to your computer, then install it as root using:
Code:
dpkg -i <package name>.deb
That will install the kernel sources as a compressed file located in /usr/src. You can uncompress it and symbolically link it to /usr/src/linux following the steps listed in the kernel recompile sticky. Hope that helps!
 
Old 01-17-2005, 05:17 PM   #10
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Original Poster
Rep: Reputation: 15
sources.list:
#deb file:///cdrom/ sarge main

deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-2 (20050109)]/ unstable contrib main
deb cdrom:[Debian GNU/Linux testing _Sarge_ - Official Snapshot i386 Binary-1 (20050109)]/ unstable contrib main



# deb http://security.debian.org/ testing/updates main contrib



The dpkg ran great and said that the kernel-source-2.6.8 was already installed.
So now when I try to install the ndiswrapper I still get the error:

“Can't find kernel sources in /lib/modules/2.6.8-1-386/build;
give the path to kernel sources with KSRC=<path> argument to make”

It happens after I issue the “make” command in the ndiswrapper dir.
I checked and there wasn't a /build folder in that directory....
 
Old 01-17-2005, 05:21 PM   #11
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
cd /usr/src
tar xvjf kernel-source-2.6.8
export KSRC=/usr/src/kernel-source-2.6.8

And then return to the directory with the ndiswrapper and type make again.
 
Old 01-17-2005, 05:46 PM   #12
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Original Poster
Rep: Reputation: 15
debian:/usr/src# tar xvjf kernel-source-2.6.8
tar: kernel-source-2.6.8: Cannot read: Is a directory
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Invalid argument
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error exit delayed from previous errors


That doesn't look good...
 
Old 01-17-2005, 05:56 PM   #13
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
It just means that its already untarred, so you can go straight ahead too

export KSRC=/usr/src/kernel-source-2.6.8

and making ndiswrapper.
 
Old 01-17-2005, 06:06 PM   #14
Ab3n
Member
 
Registered: Sep 2004
Location: Colorado, USA
Distribution: CentOS 5
Posts: 144

Original Poster
Rep: Reputation: 15
debian:/home/hewitsonj/ndiswrapper-0.12# make
make -C driver
make[1]: Entering directory `/home/hewitsonj/ndiswrapper-0.12/driver'
Can't find kernel sources in /usr/src/kernel-source-2.6.8;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/home/hewitsonj/ndiswrapper-0.12/driver'
make: *** [all] Error 2

I did the export command...Man I suck at this.

Last edited by Ab3n; 01-17-2005 at 08:50 PM.
 
Old 01-17-2005, 06:20 PM   #15
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Try

export KSRC=/usr/src/kernel-source-2.6.8
export KVERS=2.6.8

If this doesn't work you could try and use the sources from Debian by apt-getting the ndiswrapper-source and ndiswrapper-util packages. and building them the debian way.
 
  


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
wlan-ng 0.2.2 compiling issues zhizaki Linux - Wireless Networking 2 10-04-2005 10:21 PM
Issues compiling gens evanw Linux - Games 1 07-14-2005 10:52 AM
issues compiling Frontline jgams Linux - Software 3 07-10-2005 12:40 AM
Latex Compiling Issues ??? teckboy1243 Linux - Software 4 04-04-2005 02:30 PM
PHP compiling issues turbo_acura Linux - General 6 10-15-2004 11:17 AM

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

All times are GMT -5. The time now is 07:49 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