VBox : unable to find the sources of your current linux kernel ubuntu

after some update for my ubuntu linux, I wasn’t able to make my VBox machines to work, so i tried to run

sudo /etc/init.d/vboxdrv setup

but no use, but after some googling i found this and it’s solved my proble

sudo apt-get install dkms
sudo apt-get install linux-headers-`uname -r|cut -d'-' -f3`-`uname -r|cut -d'-' -f4`

referance : http://www.khattam.info/solved-error-unable-to-find-the-sources-of-your-current-linux-kernel-specify-kern_dir-and-run-make-again-stop-2010-11-26.html

9 thoughts on “VBox : unable to find the sources of your current linux kernel ubuntu

  1. zx6r says:

    nice. thanks..i have solved it. what i’m doing is remove first dkms and install sudo apt-get install linux-headers-`uname’ and re-install back dkms.

  2. John Sanabria says:

    the uname and cut commands did not work with my current installation (Ubuntu 12.10).
    my current uname’s output is
    Linux leader-2 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:26:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    I need install the linux-headers-3.5.0-18-generic package, so the apt-get command to install my required headers should be changed to this command
    sudo apt-get install linux-headers-`uname -r|cut -d’ ‘ -f 3`

    Regards,

  3. Eric Light says:

    Great, thanks heaps! Nice fast fix.

  4. AR0x7E7 says:

    sudo apt-get install dkms
    sudo apt-get install linux-headers-`uname -r|cut -d’ ‘ -f 3`

    worked for me on Ubuntu 12.10 fine – thx!

    1. Ma'moun othman says:

      Thanks for the update @AR0x7E7

  5. dude says:

    used it for debian 7

    and the first command

    apt-get install dkms

    thanks helped me!

  6. wffger says:

    Building the OpenGL support module FAILD

  7. It works says:

    🙂 thanks

  8. hellboy says:

    Thanks, this was very helpful 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *