LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install kernel source? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-kernel-source-843853/)

pinga123 11-12-2010 04:36 AM

How to install kernel source?
 
During installation of one of driver i needed to

Remove any earlier version drivers using
make clean -r command.

Where i m getting following error.
Code:

# make clean -r
Kernel source is not installed
make: *** [kernelsrccheck] Error 1

My kernel version

Code:

# uname -r
2.6.18-128.2.1.4.9.el5xen

Where would i get kernel source ?
How should i install it.

Nylex 11-12-2010 04:38 AM

Use your distribution's package manager to get the kernel source package for the kernel you're running.

pinga123 11-12-2010 04:43 AM

Quote:

Originally Posted by Nylex (Post 4156607)
Use your distribution's package manager to get the kernel source package for the kernel you're running.

We havent setup YUM.

However i can see following options for O.S download.
Oracle VM Server 2.2.0 373M
Oracle VM Server 2.2.0 Source 600M

Will i get the kernel source in 2nd CD?

Nylex 11-12-2010 04:45 AM

I don't know. Have a look? I assume the package is called something like "kernel-source-version".

pinga123 11-12-2010 10:10 AM

I have got kernel-2.6.18-128.2.1.4.9.el5.src.rpm from the source CD .
Now i m confused how to install it .
As even running rpm -ivh kernel-2.6.18-128.2.1.4.9.el5.src.rpm
I m getting same error.
Edit/Delete Message

Nylex 11-13-2010 02:36 AM

Where is the makefile looking for the kernel source? You might want to post said makefile here.

shpenat 11-13-2010 05:15 AM

Can you be more specific about what system and what CDs are you using?

Some distribution provide only one (maybe two) CDs as installation medium, but they rarely contain any source codes. If you have full set if CDs for your linux (which should be something around 5) then they might contain your kernel sources.


All times are GMT -5. The time now is 10:29 AM.