LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-08-2006, 01:29 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Rep: Reputation: 54
How do you install kernel sources?


I'm trying to get GSX installed on FC5 but it says I need kernel sources installed, I did tons of research, downloaded RPMs for kernel sources, etc etc... I just can't get the damn thing installed, or if it did install, I have no clue where it went. When I do rpm -i on the rpm theres a slight delay then it brings me back to the prompt, so I dont even know if it did install or not, or if I even have the right rpm.

I have the DVD, so if it happends to be on there installing from DVD is an option as well, just not sure what file I'd have to get, etc...


Also, I need to install X libraries, how would I go about doing that? I'm pretty sure that's on the DVD, so how would I go into a mode where I can select packages? (kind of like add/remove components, type deal).
 
Old 07-08-2006, 01:39 PM   #2
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 47
You need to find the kernel source package on your distro's install media and install it. It will install to '/usr/src/linux-<version>' when you are done, make sure the output of 'uname -r' is the same as the version in your '/usr/src/' directory or the drivers will not work right.

Quote:
Also, I need to install X libraries, how would I go about doing that? I'm pretty sure that's on the DVD, so how would I go into a mode where I can select packages? (kind of like add/remove components, type deal).
I don't know anything about Fedora, but you can install the rpm's manually from your install medium or use 'yum'.

regards,
...aaron
 
Old 07-08-2006, 01:41 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Whereever you got your current precompiled rpm kernel there should be a one that matches in version number to kernel-devel.*.rpm

Example of my defualt ones I keeped from the install
# rpm -qa | grep kernel
kernel-2.6.9-5.0.3.EL
kernel-devel-2.6.9-5.0.3.EL

Since most of my hardware is non standard for those precompiled kernels I build my own from source. I just keep these around for references.

Brian1

Last edited by Brian1; 07-08-2006 at 01:43 PM.
 
Old 07-08-2006, 01:59 PM   #4
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
So both kernel sources and X should be on the media right? Is there a way to do it through a "add/remove" system? That way I dont have to deal with the depandancy issue that I'll most likely face if I try to rpm -i the RPM individually from the mounted CD.
 
Old 07-08-2006, 02:28 PM   #5
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
I tried installing the packages kernel-devel-2.6.15-1.2054_FC5.i586.rpm and kernel-devel-2.6.15-1.2054_FC5.i686.rpm but it says its already installed (probably from me trying to figure out how to install it) but yet there is no linux folder in /usr/src/ There is only kernels and redhat. There's also this command I read on I had to do to the /usr/src/redhat/SPECS/kernel-2.6.spec (rpmbuild or something, I cant remember) but that command did not do much other then spit out random text strings. I remember trying it once at work as I ran into a similar issue, and the process lasted about 6 hours, but this time it lasted a few seconds. Both instances, it basically just stopped, but nothing really happened to the system (no new folders, etc).
 
Old 07-08-2006, 02:32 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
If that is the case then it should work. Where does the contents of kernel-devel-2.6.15-1.2054_FC5.i686.rpm is installed?

Not sure but the kernel is i586 and the devel is i686. Not sure if that makes a differnece or not.

Brian1

Last edited by Brian1; 07-08-2006 at 02:34 PM.
 
Old 07-08-2006, 02:59 PM   #7
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by Brian1
If that is the case then it should work. Where does the contents of kernel-devel-2.6.15-1.2054_FC5.i686.rpm is installed?
It's suppost to go in /usr/src/linux-[kernel name] like mentioned, but its not there, and that's the problem I'm getting. It does not actually install, but it says its installed already.
 
Old 07-08-2006, 07:31 PM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
You can extract the contents of the rpm just like a tar file and place them where needed.

Brian1
 
Old 07-09-2006, 12:09 PM   #9
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Oh so is that what I have to do? Then whatever program needs the sources I just point it there? What is the switch to exact, the rpm --help gives me a migraine trying to look at it and it seems to not even have most switches.
 
Old 07-09-2006, 12:28 PM   #10
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 47
try 'tar -vxf your.rpm -C /extract/directory'. This is just a standard extract command, it works for Slackware's .tgz packages, hopefully it will work for rpm's as well.

...aaron
 
Old 07-09-2006, 02:39 PM   #11
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
I just get "tar: This does not look like a tar archive"

When I try to install it it says its already installed. How can I find out where? And would it require any other intervention, like compiling or something? I dont even understand the concept of installing kernel sources, why cant it just be a tar file with .h files in it? But from the sound of it, it needs to be installed as if it was a program.
 
Old 07-09-2006, 03:24 PM   #12
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Hmm now that I reread this error, its actually saying that a newer one is installed, and not THAT one... so how do I force it to install anyway? I tried to compile the new one to see if it would actually work but I just got a dependancy error (as usuall...) I dont even want to go there. If I can get the source of the current kernel working, thats all I want.

Code:
[root@borg RPMS]# rpm -iv kernel-devel-2.6.15-1.2054_FC5.i686.rpm 
Preparing packages for installation...
        package kernel-devel-2.6.17-1.2139_FC5 (which is newer than kernel-devel-2.6.15-1.2054_FC5) is already installed
        package kernel-devel-2.6.17-1.2145_FC5 (which is newer than kernel-devel-2.6.15-1.2054_FC5) is already installed
[root@borg RPMS]#
 
Old 07-09-2006, 04:14 PM   #13
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
You can use the --force option. rpm -ivh --force *.rpm

Brian1
 
Old 07-11-2006, 08:50 AM   #14
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Thanks that worked. I got GSX installed now, this is sweeet!
 
  


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
Install kernel sources? cheesekeeper Fedora 2 02-04-2005 06:05 AM
where to dl (and how to install) kernel 2.4.25 sources in MDK 10 shenlong Mandriva 3 04-04-2004 01:01 PM
Help!!! Cannot install the kernel sources!!! RJARRRPCGP Linux - Newbie 3 02-15-2004 10:14 PM
I didn't install full kernel sources? nutshell Linux - General 6 05-08-2003 12:44 PM
How do I install the kernel sources?? justiceisblind Linux - Newbie 12 03-11-2002 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:23 AM.

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