LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 05-05-2007, 03:58 AM   #1
fallen3019
LQ Newbie
 
Registered: May 2007
Distribution: Suse 10.1
Posts: 11

Rep: Reputation: 0
Matchup of kernel header and source, and apt-get problem


I just installed Linux Suse 10.1, but i'm not sure that the source files and headerfiles versions match.

i checked the source with
Code:
# uname -r
2.6.16.13-4-default

how to I check what version the header files are? (i know that i can do this somewhere in YAST but i'm not entirely sure where to find this...)

And if they are not the same, how can i get them to match?

Also.... one small other thing...
Bash does not recgonise the apt-get command... is there a way i should configure that?
because i tried to use the following, and i got the following error...

Code:
# apt-get install linux-headers-`(uname -r)`
-bash: apt-get: command not found
Thanks!
 
Old 05-05-2007, 12:10 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 54
Suse does not come with apt, did you install it?
Why do you need the headers, what are you trying to do?
 
Old 05-06-2007, 06:27 AM   #3
fallen3019
LQ Newbie
 
Registered: May 2007
Distribution: Suse 10.1
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by comprookie2000
Suse does not come with apt, did you install it?
ok, after a lot of trouble, i solved this problem, thanks

Quote:
Originally Posted by comprookie2000
Why do you need the headers, what are you trying to do?
That would be my next problem.

What I am trying to do is find the offset of a member of the struct task_struct in sched.h.

I have a small C (standalone) program that uses the offsetof () function to find eg: 'pid' in the struct.
However this is giving me a multitude of errors, from files that are in the includes of sched.h, when i try to compile it with gcc.
I was wondering if the reason for these errors was because of the version of the headers not being the same as the kernel.. (that's why I need to check)
However,I am beginning to suspect that the problem is with gcc...

Last edited by fallen3019; 05-06-2007 at 12:01 PM.
 
  


Reply

Tags
gcc, headers, kernel


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
kernel-source or kernel-header? haiti Debian 4 09-25-2006 09:06 PM
apt-get install kernel-source-2.6.10 not working gauri Debian 7 02-17-2006 02:58 PM
Where does apt place kernel-source? Mondus Linux - Hardware 5 07-30-2005 11:29 AM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
apt-get kernel source Zaskar Debian 2 02-25-2004 02:22 PM


All times are GMT -5. The time now is 04:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration