Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: Chriswilliams on June 17, 2008, 09:54:46 PM
-
Simple question from a novice:
I am recompiling a kernel module.
During make I get the message "You do not appear to have the sources for the 2.6.9-67.0.7.EL kernel installed"
How do I install the sources with yum. AND do I need all the sources OR do I really just need the headers?
I have tried " yum install linux-headers-`uname -r` "
but it can't find anything to install.
Thanks for your help.
Chris.
-
Simple question from a novice:
I am recompiling a kernel module.
During make I get the message "You do not appear to have the sources for the 2.6.9-67.0.7.EL kernel installed"
How do I install the sources with yum. AND do I need all the sources OR do I really just need the headers?
I have tried " yum install linux-headers-`uname -r` "
but it can't find anything to install.
Thanks for your help.
Chris.
It is best not to cpmpile on your server, but on a CentOS 4.6 machine (on which SME Server is based) and I would refrain from compiling anything if you are a linux newbie.
If you really would like to have a go, you should not install linux-headers, this is a package that does not exist on RHEL/CentOS based systems, I think you need kernel-devel:
yum install kernel-devel
-
Good advice (not to do it) BUT continuing anyway:
I think I can see my problem:
[root@storm2 ~]# uname -r
2.6.9-67.0.7.EL
[root@storm2 ~]# rpm -q kernel
kernel-2.6.9-67.0.1.EL
kernel-2.6.9-67.0.7.EL
[root@storm2 ~]# rpm -q kernel-devel
kernel-devel-2.6.9-67.0.15.EL
[root@storm2 ~]#
SO: I am running 0.7.EL
I have installed 0.1.EL and 0.7.EL
BUT my kernel-devel is 0.15.EL
Checking in /lib/modules/2.6.9-67.0.15.EL has a directory build which I think indicates that kernel-devel is there.
Since I can't load kernel-devel-2.6.9-67.0.7.EL, it can't find it,
Should I update the kernel to 0.15.EL (yum install kernel--2.6.9-67.0.15.EL is that correct),
or is there a better answer.
I am learing slowly, thanks for your help.
Chris.
-
Good advice (not to do it) BUT continuing anyway:
I think I can see my problem:
[root@storm2 ~]# uname -r
2.6.9-67.0.7.EL
[root@storm2 ~]# rpm -q kernel
kernel-2.6.9-67.0.1.EL
kernel-2.6.9-67.0.7.EL
[root@storm2 ~]# rpm -q kernel-devel
kernel-devel-2.6.9-67.0.15.EL
[root@storm2 ~]#
Since you seem to have messed up your system already by installing all sorts of development libs I really advise you no to go any further...
SO: I am running 0.7.EL
I have installed 0.1.EL and 0.7.EL
BUT my kernel-devel is 0.15.EL
Checking in /lib/modules/2.6.9-67.0.15.EL has a directory build which I think indicates that kernel-devel is there.
Since I can't load kernel-devel-2.6.9-67.0.7.EL, it can't find it,
Should I update the kernel to 0.15.EL (yum install kernel--2.6.9-67.0.15.EL is that correct),
or is there a better answer.
It seems an update is released somehow for the kernel-devel, but not for the kernel itself... which seems strange to me. However you can easily install kernel-devel for your current version by installing like this (as long as you run the single processor kernel):
yum install kernel-devel-`uname -r`
If you are running another kernel you should drop the suffix after EL that is reported by the uname -r command. In your case it would read:
yum install kernel-devel-2.6.9-67.0.7.EL
When I do so on my test machine it looks like this and does work:
yum install kernel-devel-2.6.9-67.0.7.EL
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - updates
Finished
Excluding Packages from CentOS - os
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel-devel to pack into transaction set.
kernel-devel-2.6.9-67.0.7 100% |=========================| 781 kB 00:01
---> Package kernel-devel.i686 0:2.6.9-67.0.7.EL set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel-devel i686 2.6.9-67.0.7.EL updates 3.9 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.9 M
Is this ok [y/N]: n
-
Thanks for sticking with me on this.
I have run yum:
[root@storm2 ~]# yum install kernel-devel-2.6.9-67.0.7.EL
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "fastestmirror" plugin
Loading "smeserver" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - updates
Finished
Excluding Packages from CentOS - os
Finished
Parsing package install arguments
Nothing to do
================================================================
No new rpms were installed. No additional commands are required.
================================================================
Its as though it thinks its already installed. But yum remove kernel-devel-2.6.9-67.0.7.EL says that no packages match that name.
I must have done something wrong at some stage, but how to recover?
Thanks,
Chris.
-
I must have done something wrong at some stage, but how to recover?
Perhaps you should remove the newer ones, with a version number higher than your current kernel.
-
THAT was the correct answer!
I did yum remove kernel-devel
and it removed 67.0.15.EL
I then tried yum install kernel-devel and it TRIED to reinstall 67.0.15.EL so I aborted.
I then tried yum install kernel-devel-2.6.9-67.0.7.EL
AND IT WORKED.
I have now been able to compile my little module.
Thanks for all your help.
Chris.
-
Thanks for all your help.
Chris.
You're welcome, although I suggest you install a sepcial (virtual) machine for it if you need to do this more often, with the CentOS version installed on which SME Server is based.