[Solved] Ubuntu jaunty virtualbox 3.0.0 error Compiling vbox

Discussions related to using VirtualBox on Linux hosts.
Post Reply
arysar
Posts: 2
Joined: 4. Jul 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

[Solved] Ubuntu jaunty virtualbox 3.0.0 error Compiling vbox

Post by arysar »

I tried to install virtualbox 3.0.0 but I get an error compiling vboxdrv the following is the /var/log/vbox-install.log:

** Compiling vboxdrv
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxdrv/3.0.0/source ->
/usr/src/vboxdrv-3.0.0

DKMS: add Completed.

Error! Your kernel source for kernel 2.6.27-7-generic cannot be found at
/lib/modules/2.6.27-7-generic/build or /lib/modules/2.6.27-7-generic/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Alto.


I already have installed
build-essential
linux-headers-generic

any ideas?

Thanks!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu jaunty virtualbox 3.0.0 error Compiling vboxdrv

Post by Perryg »

Type uname -r and see if the kernel you are using matches the one that is being asked for.
I found that the grub update in my Ubuntu 9.04 failed (when the last kernel was updated) to update and caused this very problem.
I simply edited my /boot/grub/menu.lst to include the new kernel and all was right with the world once again.
Be sure not to deleted any lines until you are sure it works, and make a backup of this file before you start or you could be reloading the OS!
arysar
Posts: 2
Joined: 4. Jul 2009, 15:51
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

Re: Ubuntu jaunty virtualbox 3.0.0 error Compiling vboxdrv

Post by arysar »

uname -r gives me:

2.6.27-7-generic


and the grub

title Ubuntu 8.10, kernel 2.6.27-7-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=c55ce624-30fb-4254-895e-b8b375c563d5 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic

so I think they are ok...

thanks!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Ubuntu jaunty virtualbox 3.0.0 error Compiling vboxdrv

Post by Sasquatch »

They are not ok. Ubuntu 8.10 uses 2.6.27, 9.04 uses 2.6.28. That line isn't there, you have to manually add it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
alukin
Posts: 17
Joined: 4. Jul 2009, 13:27
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win XP, Fedora 12

Re: Ubuntu jaunty virtualbox 3.0.0 error Compiling vboxdrv

Post by alukin »

Solution is easy. You need some parts of kernel source (heacders) to compile VB drivers.

On Ubuntu just do:

apt-get install build-essential
mrwoodbrick
Posts: 1
Joined: 14. Jul 2009, 12:04
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP

Re: Ubuntu jaunty virtualbox 3.0.0 error Compiling vboxdrv

Post by mrwoodbrick »

Hey thanks. I was tearing my hair out over the same error. All I did was:

sudo gedit /boot/grub/menu.lst

and changed the top lines to reflect the new kernel version on my system (2-6-28-13-generic)

After restart, the Virtualbox kernel module compiled with no hitch.

Thanks again.
Post Reply