Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I upgraded my kernel on Ubuntu 12.04 in order to gain access to the include/uapi/ headers.
The full kernel version that I upgraded to is 3.9.0-030900-generic, following this tutorial.

Unfortunately, the headers seem to have remained the same because the uapi directory doesn't exist. To diagnose the problem, I tried to download the source for my 3.9 kernel with:

sudo apt-get source linux-image-$(uname -r)

However the output is

Picking 'linux' as source package instead of 'linux-image-3.9.0-030900-generic'

And this results in the kernel source for 3.2 being downloaded instead of 3.9.

What action must I take to install the kernel/headers properly?

I looked through these two posts before posting for insights, to no avail:

share|improve this question
    
Mainline kernel are mostly for test, you can however install kernel 3.8 from ubuntu officual repositories. –  xangua Nov 26 '13 at 20:20
    
Be aware that you can upgrade to the kernel 3.8 via official updates in Precide (Raring kernel) according to: wiki.ubuntu.com/Kernel/LTSEnablementStack , does this kernel contain the feature you want? –  xangua Dec 24 '13 at 2:19
add comment

1 Answer

I suggest you download and install the headers appropriate to your architecture; either 32- or 64-bit, from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-raring/

share|improve this answer
    
I currently have several header directories, both 3.5.0-linux-headers-3.5.0-23(-generic) and linux-headers-3.9.0-030900-generic. How do I ensure that the 3.9 is set as the default? (Currently my attempts to compile code indicate that 3.5 is still being used) –  eitan27 Nov 27 '13 at 9:04
    
Generally, any compile will attempt to use headers matching the currently running kernel: uname -r. If you are not running 3.9.0-xx, reboot and you may have to select it at the GRUB menu. –  chili555 Nov 27 '13 at 14:16
    
I am running 3.9.0-xx, according to uname -r. I also did a sudo update-grub and restarted just to make sure. (Same reuslts). –  eitan27 Nov 29 '13 at 20:41
    
Do you have the exact matching headers installed? sudo dpkg -s linux-headers-$(uname -r) | head -n3 Where and how did you get the 3.9.0-xx kernel? The headers should be there, too. –  chili555 Nov 29 '13 at 22:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.