LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No kernel Sources Installed - I don't get it (https://www.linuxquestions.org/questions/linux-newbie-8/no-kernel-sources-installed-i-dont-get-it-625968/)

Chazzman_bm 03-05-2008 03:04 PM

No kernel Sources Installed - I don't get it
 
Hi folks. Like so many people on the forum, I'm struggling with installing software. I'm running Mandriva 2007 and get the following when running 'make' (following 'make clean', './configure' and 'make menuselect':

[root@alpha zaptel-1.4.8]# make
grep: /include/linux/autoconf.h: No such file or directory
grep: /include/linux/autoconf.h: No such file or directory
make[1]: Entering directory `/usr/src/zaptel-1.4.8'
gcc -o makefw makefw.c
./makefw tormenta2.rbt tor2fw > tor2fw.h
Loaded 69900 bytes from file
./makefw pciradio.rbt radfw > radfw.h
Loaded 42096 bytes from file
You do not appear to have the sources for the 2.6.12-12mdksmp kernel installed.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/zaptel-1.4.8'
make: *** [all] Error 2
[root@alpha zaptel-1.4.8]#

Before I get flamed, I have done the Google and forum searches and have gone to the EasyURPMI site and followed the instructions. I ran the commands for all the options (main, contrib, plf) but still the same message. Thinking that I might have missed something, I logged in as root and ran the package updater tool and left it running to download 700+ MB worth of stuff.

Another reboot and another attempt at installing the software and the same message occurs.

Obviously, I'm no Linux guru but how can you tell if I have the sources installed?

Thanks for your help.

sycamorex 03-05-2008 03:40 PM

Hi

Have you done:

Quote:

# urpmi kernel-`uname -r`
?

If it still doesn't work, you can grab the latest stable kernel from kernel.org and compile it on your system.
This way you'll learn how to compile a new kernel and you'll have the necessary sources.:)
It's really not that hard - just follow the tutorials that you can easily google.
HTH

Chazzman_bm 03-05-2008 04:17 PM

Sycamorex,

Running urpmi kernel- 'uname -r' gives a bunch of output and, at the end, this :

no package named uname -r

So it looks like I'll need to learn how to compile a new kernel.

Thanks.

jlliagre 03-05-2008 04:35 PM

There is an extra space in the command you ran.

Tinkster 03-05-2008 05:02 PM

Plus those are back-ticks, not apostrophes

H_TeXMeX_H 03-06-2008 08:06 AM

Don't use the backticks, newer version of bash don't even support them, run this:

Code:

urpmi kernel-$(uname -r)

Tinkster 03-06-2008 11:30 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 3079968)
Don't use the backticks, newer version of bash don't even support them, run this:

Code:

urpmi kernel-$(uname -r)

How new would new have to be not to support back-ticks?
Works fine with 3.2.25


That would break a few scripts, I'd imagine.


Cheers,
Tink

H_TeXMeX_H 03-06-2008 01:34 PM

I can't find the article now, but I'm quite sure I read somewhere that they were doing away with the backticks in newer bash versions. And it would be a very good thing, it would make things a lot more readable if people were forced to use the new format. (it's also much easier to nest, which you already know)

Tinkster 03-06-2008 01:47 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3080308)
I can't find the article now, but I'm quite sure I read somewhere that they were doing away with the backticks in newer bash versions. And it would be a very good thing, it would make things a lot more readable if people were forced to use the new format. (it's also much easier to nest, which you already know)

I appreciate that :}

But removing it just like that would still break a truck-load
of existing scripts. I'd be curious to see the discussions
around that for sure.


Cheers,
Tink

Chazzman_bm 03-19-2008 01:58 AM

Hello,

I have located and downloaded the Mandriva 2006 Disks 1 to 3 (iso images) from the following location.

ftp://ftp.mirrorservice.org/sites/ca...so/2006.0/i586)

What do I need to do now to update the sources? Do I have to copy the contents in a specific location (specific locations) or is there something I need to run for the system to go and pick up the sources up from the downloaded location?

I'm not sure if it makes a difference but I have downloaded everything to my home directory.

Thanks.

sycamorex 03-19-2008 04:33 AM

First it'd be good to update your system, use the updater package from your menu and then:
Can you give us the output of:

Code:

# urpmi kernel-`uname -r`
As others pointed out those are back-ticks (On my keyboard it's the key to the left of '1' and there's no space between kernel- and the first back-tick.

Or as H TexMex H suggested try:
Code:

# urpmi kernel-$(uname -r)
Assuming your computer is connected to the internet this command should solve the problem, you don't need to download the .iso images.

uname -r gives the version of the kernel you are running. You can type it in the console.

Using the "urpmi kernel-`uname -r`" or "urpmi kernel-$(uname -r)" will ensure that you install the right kernel package for your system.

Make sure you type it as root

ps. why don't you use a more up-to-date version of Mandriva. I don't use Mandriva but as far as I remember, Mandriva 2008 is out.
hth

Chazzman_bm 03-19-2008 06:27 AM

Output as requested:

[root@alpha ~]# urpmi kernel-`uname -r`
no package named kernel-2.6.12-12mdksmp
[root@alpha ~]# urpmi kernel-$(uname -r)
no package named kernel-2.6.12-12mdksmp
[root@alpha ~]#

"why don't you use a more up-to-date version of Mandriva. I don't use Mandriva but as far as I remember, Mandriva 2008 is out."

A couple of reasons really.
1)My CD drive is busted making a new installation a pain
and
2) Because all I wanted to do is install a bit of software on my server, I thought that I'd 'just' get and update the sources. I didn't expect it to be this complicated.

sycamorex 03-19-2008 07:43 AM

Well, I am just guessing now but it might stem from the fact that:
a) you don't have the source repository enabled
b) your kernel is too old to be included in the main repository

If you don't want/need to install the latest Mandriva, perhaps downloading the latest kernel and recompiling it would be a solution. This way you would have an up-to-date kernel and sources.

Alternatively, I would assume you'd need to mount the iso images you downloaded, find the package 'kernel-2.6.12-12mdksmp' and install it manually.

regards

sycamorex

Chazzman_bm 03-19-2008 08:04 AM

To be honest, I'll take the path of least resistance at this stage. I've never compiled a kernel and wouldn't know where to start.

The second option sounds like the one I'd probably go for but I don't know how to 'mount' an iso image. Sorry to sound like such a bonehead but this is all pretty new to me.

sycamorex 03-19-2008 08:40 AM

Personally I think that if your hardware is not too old I'd suggest getting a newer system.

Compiling a kernel is not as difficult as it sounds:
http://www.howtoforge.com/kernel_compilation_mandriva

To mount an iso image:
1. Go to the directory where your images are saved.
2. create a directory e.g iso_image1
Quote:

# mount -t iso9660 -o loop your_image.iso path
eg
Quote:

# mount -t iso9660 -o loop mandriva2006.iso iso_image1
and then you can cd into this directory and browse the files.


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