Page 1 of 1

Ubuntu 12.10 unable to find sources of your current kernel

Posted: 7. Nov 2012, 11:07
by Zap
Hi,

Just did an apt-get dist-upgrade, and installed the latest kernel for Ubuntu 12.10 64x Quantal.
The virtualbox I'm runnig is downloaded and installed from virtualbox website, not ubuntu package manager. Version 4.2.4 r81684
When lauching virtualbox win7 b6x vdi I'm getting:

Code: Select all

Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
runnig /etc/init.d/vboxdrv setup

Code: Select all

* Stopping VirtualBox kernel modules                                                                                                                                                                         [ OK ] 
 * Recompiling VirtualBox kernel modules                                                                                                                                                                             
 * Look at /var/log/vbox-install.log to find out what went wrong
checking the /var/log/vbox-install.log

Code: Select all

Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
the latest kernel is:
uname -r
3.5.0-18-generic

Re: Unubtu 12.10 unable to find the sources of your current

Posted: 7. Nov 2012, 12:09
by Twisted Lucidity
Do you actually have the kernel sources installed? I think they should be in "/usr/src", or you can check that you have the correct "linux-headers" or "dkms" package installed.

Re: Unubtu 12.10 unable to find the sources of your current

Posted: 7. Nov 2012, 12:21
by Zap
the linux headers in /usr/src are pointing to the last kernel
linux-headers-3.5.0-17/ vboxhost-4.2.4/
I could not run /etc/init.d/vboxdrv setup to generate new headers.

Do you know the correct dkms file name? was checking some time ago and there was no support for 64x.
apt-cache search dkms
dh-modaliases - debhelper extension for scanning kernel module aliases
dkms - Dynamic Kernel Module Support Framework
broadcom-sta-dkms - dkms source for the Broadcom STA Wireless driver
open-vm-dkms - Source for VMware guest systems driver (DKMS)
pvcam-dkms - kernel module for Coolsnap pci card
sl-modem-dkms - SmartLink software modem driver - module building source
sl-modem-source - SmartLink software modem driver (dummy transitional package)
sl-modem-daemon - SmartLink software modem daemon
asus-oled-dkms - Driver for Asus OLED display present in some Asus laptops
backfire-dkms - kernel module for signal benchmarking (DKMS)
blcr-dkms - DKMS support for BLCR kernel module
blktap-dkms - Xen API blktap kernel component DKMS package
crystalhd-dkms - Crystal HD Video Decoder (Linux kernel driver)
dahdi-dkms - DAHDI telephony interface (dkms kernel driver)
iscsitarget-dkms - iSCSI Enterprise Target kernel module source - dkms version
lttng-modules-dkms - Kernel modules for LTTng (DKMS)
ndiswrapper-dkms - Source for the ndiswrapper Linux kernel module (DKMS)
openafs-modules-dkms - AFS distributed filesystem kernel module DKMS source
openswan - Internet Key Exchange daemon
openswan-modules-dkms - Internet Key Exchange daemon - DKMS source
oss4-dkms - Open Sound System - DKMS module sources
r8168-dkms - dkms source for the r8168 network driver
tp-smapi-dkms - ThinkPad hardware/firmware access modules source - dkms version
v4l2loopback-dkms - Source for the v4l2loopback driver (DKMS)
virtualbox - x86 virtualization solution - base binaries
virtualbox-dkms - x86 virtualization solution - kernel module sources for dkms
virtualbox-guest-dkms - x86 virtualization solution - guest addition module source for dkms
virtualbox-ose-dkms - transitional package for virtualbox-dkms
virtualbox-ose-guest-dkms - transitional package for virtualbox-guest-dkms
west-chamber-dkms - iptable extension for bypassing content filtering firewall (dkms)
xtables-addons-common - Extensions targets and matches for iptables [tools, libs]
xtables-addons-dkms - Extensions targets and matches for iptables
openvswitch-datapath-dkms - Open vSwitch datapath module source - DKMS version

Re: Unubtu 12.10 unable to find the sources of your current

Posted: 7. Nov 2012, 15:45
by Perryg
In a terminal run the following:

Code: Select all

sudo apt-get install dkms

Re: Unubtu 12.10 unable to find the sources of your current

Posted: 7. Nov 2012, 18:52
by Zap
Something is seriously wrong.
New fresh install of ubuntu 12.10 64x.
Did all updates... including new kernel 3.5.0-18-generic
Also installed
sudo apt-get install dkms

download the virtualbox for ubuntu 12.10 64x and extension pack
created a win7 guest machine
and kabummmmm
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
log file:
Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.2.4

------------------------------
Deleting module version: 4.2.4
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.2.4/source ->
/usr/src/vboxhost-4.2.4

DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 7. Nov 2012, 19:56
by Perryg
Ok but did you install the necessary packages to be able to build external modules?
Try this

Code: Select all

sudo apt-get install dkms build-essential linux-headers-generic
and then run

Code: Select all

sudo /etc/init.d/vboxdrv setup

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 7. Nov 2012, 20:14
by Zap
Thanks Perryg

Did snoop around the forum for dependecies, managed to have the dkms :)
Some installers check for that... well ... solved now
Thanks for your help

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 8. Nov 2012, 04:46
by shaoex
Zap wrote:Thanks Perryg

Did snoop around the forum for dependecies, managed to have the dkms :)
Some installers check for that... well ... solved now
Thanks for your help
Hello there, care to share what you did Zap? am just starting using this software and got the same issue, i'd really appreciate it. THanks in advance.

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 10. Nov 2012, 03:42
by DrewT
Hello there, care to share what you did Zap? am just starting using this software and got the same issue, i'd really appreciate it. THanks in advance.
Can't speak for Zap, but I had the same problem, and the commands from Perryg's post fixed it. Thanks, Perryg!

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 14. Dec 2012, 12:10
by ja_n
What worked in my case was

Code: Select all

sudo apt-get install linux-headers-2.6.32-38-generic

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 4. Feb 2013, 10:48
by brizmako
Thank you Perryg, worked perfectly first time :)

Re: Ubuntu 12.10 unable to find sources of your current kern

Posted: 15. Feb 2013, 04:39
by bbrooks
perryg thank you it work like a charm.