LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2004, 11:14 AM   #1
Sinope
Member
 
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82

Rep: Reputation: 15
/usr/src/linux doesn't exist! How do I install it?


Trying to compile GeForce4 drivers on Debian 3 (yes, I gave up on Slackware).

Compiled the driver no problem, but when it came time to compile the kernel, I got an error message to the effect of "your kernel was compiled with something different than you are using now. jerk." and a suggestion that I turn on IGNORE_CC_MISMATCH. I did so, and it worked, except that my kernel source seems not to exist!

There is no /usr/src/linux directory! Clearly I didn't install the kernel source, so how do I do this without reinstalling the whole system? Thanks!
 
Old 08-09-2004, 11:18 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
ok, /usr/src/linux is a sym-link into the actual kernel source tree

so if you have a source tree ( ls /usr/src ) then just create a sym-link to /usr/src/linux

if you actualy have no kernel source, then apt-get one (i think thats what you debian people use right?)

its important to get the kernel sources that were used to compile the kernel that you use, that way its sure to be most compatible

http://www.kernel.org is where the linux kernels are kept if you want a fresh tree
 
Old 08-09-2004, 11:20 AM   #3
Sinope
Member
 
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82

Original Poster
Rep: Reputation: 15
Just create a sym-link.... is that all? :P I have no idea what that means, man!
 
Old 08-09-2004, 11:22 AM   #4
ducky
LQ Newbie
 
Registered: Aug 2003
Location: Myanmar
Distribution: Gentoo, Debian
Posts: 7

Rep: Reputation: 0
/usr/src/linux is a symbolic link to your kernel tree.

Grab a kernel (kernel.org).
Extract it to /usr/src.
Create a symbolic link (ln -s /usr/src/linux-x-x-x /usr/src/linux)
(linux-x-x-x is the kernel source that you've extracted)

Now you are ready to tweak your kernel.
 
Old 08-09-2004, 11:24 AM   #5
Sinope
Member
 
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82

Original Poster
Rep: Reputation: 15
Aaaaah very clever! I think I understand now. Thanks!
 
Old 08-09-2004, 02:53 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You really ought to grab your kernel via apt-get. The kernel source you compile the driver against must be the same as the kernel running on your system, otherwise things can fail in strange ways. Do uname -r to see what kernel you are running, and then do: apt-get install kernel-source-<version>.

This is necessary since many distros, including Debian, do not use stock Linux kernels, but ones that have been specially modified with backports and the like. Therefore a vanilla kernel.org kernel will probably not match up with the kernel you're running on your system.

Last edited by btmiller; 08-09-2004 at 02:54 PM.
 
  


Reply


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
/usr/src/linux does not exist Sigkill(9) Linux - Newbie 2 01-02-2005 12:54 PM
/usr/src/linux doesnt exist? santasballz Linux - Newbie 7 02-08-2004 10:32 AM
where is /usr/src/linux matt_w_lambert Mandriva 5 12-26-2003 12:29 AM
Help!!... /usr/src/linux/Makefile does not exist. PhoenixZorn Slackware 4 11-16-2003 08:14 PM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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