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'm trying to install Virtualbox on Ubuntu 12.10 64bit, (Kernel 3.5.0-23). I've already installed dkms, build-essential, linux-source, linux-kernel-headers, ... . I still get this error:

Error! Your kernel headers for kernel 3.5.0-23-generic cannot be found. Please install the linux-headers-3.5.0-23-generic package, or use the --kernelsourcedir option to tell DKMS where it's located

The kernel headers and source are in their appropriate place:

ls /usr/src
linux-headers-3.5.0-23          linux-source-3.5.0
linux-headers-3.5.0-24          linux-source-3.5.0.tar.bz2
linux-headers-3.5.0-24-generic

I know there are tons of similar questions on different forums, I've tried all of them. None of them works. Can anyone help me please?

share|improve this question
    
Have you tried rebooting? 3.5.0-24 was released today and it looks like you have downloaded it but virtualbox thinks you are still running kernel 3.5.0-23. You can also try running 'uname -a' from the command line to find your kernel version. –  notkevin Feb 20 '13 at 1:58
add comment

2 Answers 2

Install the kernel headers for your system by running this command in your terminal (Ctrl+Alt+T):

sudo apt-get install linux-headers-$(uname -r)
share|improve this answer
add comment

Install the kernel headers for the running kernel

sudo apt-get install linux-headers-$(uname -r)

Or simply use the linux-headers-generic to install latest release kernel headers.

NOTE: If you have Hardware Enablement Stack (backported) kernels installed on a LTS release, use the linux-headers-current package to install the latest kernel images + headers.

For example, on Ubuntu 12.04, the release kernel is 3.2.0, the linux-current-generic installs 3.8.0-27.

share|improve this answer
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.