LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing Kernel Source (https://www.linuxquestions.org/questions/linux-newbie-8/installing-kernel-source-678364/)

mark165 10-22-2008 01:28 PM

Installing Kernel Source
 
First of all, i'm tying to install this:
http://www.tanzband-scream.at/line6/index.html

I've downloaded the Binary version for the RPM installation, and extracted it. As the instructions say, i need to type "rpmbuild -tb line6usb-0.7.3.tar.bz2" first.

However when i do that i get this:


mark@mark-desktop:~$ sudo rpmbuild -tb line6usb-0.7.3.tar.bz2
error: Failed build dependencies:
kernel-source is needed by line6usb-0.7.3-1.x86_64


I've looked on google for installing the kernel source for Ubuntu, and from what i've managed to do so far appears that i have infact downloaded the kernel source, to test it again i type this in Terminal:


mark@mark-desktop:~$ sudo apt-get install linux-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-source is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mark@mark-desktop:~$


In my /usr/src folder, there is "linux-source-2.6.24.tar". From a tutorial i extracted that, and have a folder called "linux-source-2.6.24" that contains alot of stuff.

Why am i getting the error that i need to install the kernel source, when it seems to be already installed? I have the kernel headers installed also, i think they were already there when i installed Ubuntu.

uname -r gives out "2.6.24-21-generic" and im using the 64bit Ubuntu 8.04, if that helps.

Total-MAdMaN 10-22-2008 01:35 PM

It's looking for a package named kernel-source. It doesn't matter that you've got the source code for the kernel installed. As long as you don't have the kernel-source package installed, you'll keep getting that error.

jay73 10-22-2008 01:40 PM

You may need to create a link called "linux" (in the same /usr/src directory) that points to the linux-source directory.

mark165 10-22-2008 02:06 PM

Thanks.

I tried this:

mark@mark-desktop:~$ cd /usr/src
mark@mark-desktop:/usr/src$ sudo ln -s /usr/src/linux-source-2.6.24 /usr/src/linux

And i still get the same error.

i then tried this:
mark@mark-desktop:/usr/src$ sudo ln -s /usr/src/linux-source-2.6.24 /usr/src/kernel-source

And it still gave me the error.

I'm really confused at the moment!

jay73 10-22-2008 04:18 PM

Try this, it is what I used:
http://www.howtoforge.com/kernel_compilation_ubuntu

james.farrow 10-23-2008 03:39 AM

I might be wrong here but it certainly won't do any harm!!

yum install kernel-devel kernel-headers

then have another go at building rpm

tredegar 10-23-2008 04:11 AM

Quote:

uname -r gives out "2.6.24-21-generic" and im using the 64bit Ubuntu 8.04, if that helps.
So you are running the 2.6.24-21-generic kernel. This is a 32-bit kernel. You may have 64-bit hardware, but you are running a 32-bit kernel. This is perfectly OK.

But you have installed linux-source-2.6.24
This is different from 2.6.24-21-generic
So your kernel source does not match the running kernel. So things will not work.

Install the headers for your currently running kernel like this
Code:

sudo apt-get install linux-headers-2.6.24-21-generic
You might also have to
Code:

sudo apt-get install build-essential
to install the c compiler and other utilities required before you can compile from source.

Then try again

@james.farrow:
Quote:

yum install kernel-devel kernel-headers
kernel-devel and kernel-headers are not the names of ubuntu packages, and ubuntu doesn't use yum, so this will not work.

mark165 10-25-2008 10:46 AM

[QUOTE=tredegar;3319505]So you are running the 2.6.24-21-generic kernel. This is a 32-bit kernel. You may have 64-bit hardware, but you are running a 32-bit kernel. This is perfectly OK.

But you have installed linux-source-2.6.24
This is different from 2.6.24-21-generic
So your kernel source does not match the running kernel. So things will not work.

Install the headers for your currently running kernel like this
Code:

sudo apt-get install linux-headers-2.6.24-21-generic
You might also have to
Code:

sudo apt-get install build-essential
to install the c compiler and other utilities required before you can compile from source.

Then try again

This is interesting. I'm sure i tried to do that, and it didn't find that kernel, maybe i was going it wrong however. I'll try again :)

I;ve discovered what i'm installing does not work with the 2.6.24-xx kernel, and found a way to install the Ubuntu 8.10 Kernels (2.6.27), and i managed to compile the source with make install instead of the other way. The source would not compile properly with 2.6.24-xx, hency why i was doing the RPM installation. I'm not entirely sure if it worked. I've managed to mess up my xorg.conf file and i don't get as far as a GUI.

I think i might just download Ubuntu 8.10 and start fresh. I know its only beta at current, but it should be alright.

As for the 32-bit kernel, i'm not sure how that happened, as i downloaded the AMD64 version of Ubuntu. Maybe this just ships with a 32-bit kernel? And your correct, i do have 64-bit hardware (AMD64) :)


All times are GMT -5. The time now is 10:33 PM.