LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   You do not appear to have the sources for the 2.6.18-274.7.1.el5.028stab095.1 kernel (https://www.linuxquestions.org/questions/linux-newbie-8/you-do-not-appear-to-have-the-sources-for-the-2-6-18-274-7-1-el5-028stab095-1-kernel-944862/)

mari0s 05-14-2012 06:43 AM

You do not appear to have the sources for the 2.6.18-274.7.1.el5.028stab095.1 kernel
 
I am trying to install dahdi-linux-complete-2.6.1+2.6.1 and get the following error when I 'make':

Code:

make -C linux all
make[1]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 2.6.18-274.7.1.el5.028stab095.1 kernel installed.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/asterisk/dahdi-linux-complete-2.6.1+2.6.1/linux'
make: *** [all] Error 2

"uname -r" gives me:
Code:

2.6.18-274.7.1.el5.028stab095.1
" rpm -qa | grep -i kernel" gives me:
Code:

kernel-headers-2.6.18-308.4.1.el5
kernel-devel-2.6.18-308.4.1.el5

I searched and found the source files at "/usr/src/kernels/2.6.18-308.4.1.el5-i686"

Can you please help with this, thank you

Ser Olmy 05-14-2012 09:46 AM

This:
Quote:

Originally Posted by mari0s (Post 4677934)
"uname -r" gives me:
Code:

2.6.18-274.7.1.el5.028stab095.1

...does not match this:
Quote:

Originally Posted by mari0s (Post 4677934)
I searched and found the source files at "/usr/src/kernels/2.6.18-308.4.1.el5-i686"

You must install the kernel source files for the kernel you're currently running (2.6.18-274.7.1.el5.028stab095.1).

mari0s 05-14-2012 05:41 PM

Quote:

Originally Posted by Ser Olmy (Post 4678043)
This:


...does not match this:


You must install the kernel source files for the kernel you're currently running (2.6.18-274.7.1.el5.028stab095.1).

thanks for the help,
am running centos 5.8 in openvz, so I tried following but didn't work:
Code:

rpm -ivh http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab095.1/ovzkernel-2.6.18-274.7.1.el5.028stab095.1.src.rpm
here are some info that may be helpful to solve this issue.
# uname -a ; rpm -qa kernel\* | sort
Code:

Linux [HOSTNAME].[DELETED] 2.6.18-274.7.1.el5.028stab095.1 #1 SMP Mon Oct 24 20:49:24 MSD 2011 i686 i686 i386 GNU/Linux
kernel-devel-2.6.18-308.4.1.el5
kernel-headers-2.6.18-308.4.1.el5

kernel-devel doesn't matches the running kernel?

Sorry my friends if this is a "so newbie" questions, i've been using linux for less than a year as a web servers and am not yet used to it but with the help of this great forums and getting some good books for command line and shell scripting i will soon catch up with you :)
thanks

Ser Olmy 05-14-2012 07:17 PM

Quote:

Originally Posted by mari0s (Post 4678322)
thanks for the help,
am running centos 5.8 in openvz, so I tried following but didn't work:
Code:

rpm -ivh http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab095.1/ovzkernel-2.6.18-274.7.1.el5.028stab095.1.src.rpm

"It didn't work" is a somewhat ambiguous error report, to put it mildly. What was the specific error message?

Quote:

Originally Posted by mari0s (Post 4678322)
here are some info that may be helpful to solve this issue.
# uname -a ; rpm -qa kernel\* | sort
Code:

Linux [HOSTNAME].[DELETED] 2.6.18-274.7.1.el5.028stab095.1 #1 SMP Mon Oct 24 20:49:24 MSD 2011 i686 i686 i386 GNU/Linux
kernel-devel-2.6.18-308.4.1.el5
kernel-headers-2.6.18-308.4.1.el5

kernel-devel doesn't matches the running kernel?

Indeed. You should uninstall these packages and replace them with ones that match your kernel.

John VV 05-14-2012 09:54 PM

why the heck are you doing this
on CentOS 5.8 ????????????????


for cent 5.8 run
Code:

yum update
----- then run -------
yum reinstall kernel
reboot

then run
Code:

yum install kernel-devel
you NEVER ever install a random kernel using rpm
there are many MANY scripts that need to run AFTER a kernel is replaced

please READ the rhel documentation and the CentOS wiki
https://access.redhat.com/knowledge/...erprise_Linux/
-- the wiki is a MUST READ !!! --
http://wiki.centos.org/

mari0s 05-15-2012 04:54 AM

Quote:

Originally Posted by John VV (Post 4678444)
why the heck are you doing this

on CentOS 5.8 ????????????????


for cent 5.8 run
Code:

yum update
----- then run -------
yum reinstall kernel
reboot

then run
Code:

yum install kernel-devel
you NEVER ever install a random kernel using rpm
there are many MANY scripts that need to run AFTER a kernel is replaced

please READ the rhel documentation and the CentOS wiki
https://access.redhat.com/knowledge/...erprise_Linux/
-- the wiki is a MUST READ !!! --
http://wiki.centos.org/

Well, i need to explain my problem more and steps i made.
this is not a physical machine, its virtual server using openvz container in a node, and there is single shared kernel for all VPS'es on the node.
before a while i needed to install gcc compiler and couldn't, then i found the exclusion "/etc/yum.conf:exclude=kernel* glib*" so i removed both exclusion, and then compiler installed successfully.
and now i made yum update, yum install the latest package by default so devel and header got updated but the kernel is locked on the shared kernel "2.6.18-274.7.1.el5.028stab095.1"
so i need to get source, headers and devel for that version of kernel. and i don't know how.


Edit: problem solved, the following package
Code:

rpm -ivh http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab095.1/ovzkernel-devel-2.6.18-274.7.1.el5.028stab095.1.i686.rpm
Fixed my problem, hope other people having same issue find this...
Thank you all :)

bartock 05-06-2013 01:19 PM

Resurrecting the dead!
 
Hi;

I find myself in the same situation with the same error.
So, just to be clear, the sources that are being referenced are *NOT* on the virtual machine, they are on the main machine. So, the host OS must have these kernel sources for this to be resolved?

Am I correct in this assumption?

Thanks - Glen


Quote:

Originally Posted by mari0s (Post 4678671)
Well, i need to explain my problem more and steps i made.
this is not a physical machine, its virtual server using openvz container in a node, and there is single shared kernel for all VPS'es on the node.
before a while i needed to install gcc compiler and couldn't, then i found the exclusion "/etc/yum.conf:exclude=kernel* glib*" so i removed both exclusion, and then compiler installed successfully.
and now i made yum update, yum install the latest package by default so devel and header got updated but the kernel is locked on the shared kernel "2.6.18-274.7.1.el5.028stab095.1"
so i need to get source, headers and devel for that version of kernel. and i don't know how.


Edit: problem solved, the following package
Code:

rpm -ivh http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab095.1/ovzkernel-devel-2.6.18-274.7.1.el5.028stab095.1.i686.rpm
Fixed my problem, hope other people having same issue find this...
Thank you all :)



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