Problems Installing/Using VirtualBox

7 Antworten [Letzter Beitrag]
technicalpickle

I am a member!

Offline
Beigetreten: 03/27/2011

Hello, I'm having trouble installing/using VirtualBox. Can anyone help me get it working? I've gone through quite a few forum posts, and here are the steps I have tried so far:

For the record, I am running Trisquel 5.5, 64-bit, with the 3.7.1-gnu kernel.

1. Install from Add/Remove Applications

Installs fine. When I try to run my VM, I get the error:

"Kernel driver not installed (rc=-1908)

Please install the virtualbox-dkms package and execute 'modprobe vboxdrv' as root."

The package virtualbox-dkms is already installed, and running sudo modprobe vboxdrv gives the error:

"FATAL: Module vboxdrv not found."

Based upon this post https://trisquel.info/en/forum/problem-installing-virtualbox I then found my kernel version with uname -a, which gave "3.7.1-gnu".

Checking sudo apt-cache search 3.7.1-gnu, I saw the header package to install was "linux-headers-3.7.1-gnu". I attempted to install it, but it was already installed.

The last thing that post suggested was starting the service before running VirtualBox, so I tried sudo service virtualbox start. This failed on the step "No suitable module for running kernel found"

The next thing I tried was installing the newest version from Oracle *shivers in disgust*

2. Installing newest version from Oracle

Following the instructions here https://www.virtualbox.org/wiki/Linux_Downloads I added deb http://download.virtualbox.org/virtualbox/debian oneiric contrib to my /etc/apt/sources.list

Got the key, added it, ran sudo apt-get update, and installed "virtualbox-4.2". This removes the previously-installed VirtualBox files.

Lots of output to the terminal, highlight is:

"Trying to register the VirtualBox kernel modules using DKMS
Error! Bad return status for module build on kernel: 3.7.1-gnu (x86_64)
Consult /var/lib/dkms/vboxhost/4.2.6/build/make.log for more information.

Failed, trying without DKMS
Recompiling VirtualBox kernel modules
Look at /var/log/vbox-install.log to find out what went wrong"

In both of the log files it tells me to look at, the following line is present:

"include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory"

Also, in the /var/log/vbox-install.log file, there is this:

"ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it."

But I'm not sure what to do with that, if that's even worth doing. At any rate, the install failed, and VirtualBox in this case cannot be run (obviously).

And that's where I'm at! Any help you can provide would be great. I'm happy to answer any questions, as well. Thanks!

lembas
Offline
Beigetreten: 05/13/2010

I haven't used VB but you have a custom kernel

>3.7.1-gnu kernel

Which apparently doesn't have that module included

>vboxdrv

Looks like the virtualbox-dkms package "provides the source code for the virtualbox kernel module to be build with dkms. Kernel sources or headers are required to compile this module."

So perhaps you need to compile the module?

technicalpickle

I am a member!

Offline
Beigetreten: 03/27/2011

So perhaps you need to compile the module?

I've never had to compile any packages I got from Add/Remove Applications or Synaptic before. Never got those package-name-src packages, and I guess you're saying this could be like one of those? Where do I go to compile it? What command do I run? Thanks!

lembas
Offline
Beigetreten: 05/13/2010

Well, first find out what the package contained

dpkg -L virtualbox-dkms

Then make a temporary directory somewhere where you have write privileges, e.g. ~/temp and copy the source tree there. Including the subfolders and their contents. (This way you don't have to compile as root.)

( ~ means your home folder btw, that is /home/$YOURUSERNAME/)

Now would be a good time to install the compiling tools

sudo apt-get install build-essential

Then jump to the temporary folder and follow the standard compilation protocol

./configure
make
sudo make install

These commands can give you warnings and other kind of output which can be ignored but they can also produce an error which means the process had failed and stopped. Usually means you're missing a development package needed for compiling.

Now the original modprobe command should work. It inserts the kernel module you just compiled into the running kernel.

Did I manage to be confusing enough?

technicalpickle

I am a member!

Offline
Beigetreten: 03/27/2011

Sounds relatively straightforward :) Thanks, I will try this soon (tonight at earliest) and report back with how it turns out!

GustavoCM

I am a member!

Offline
Beigetreten: 11/20/2012

That would be:


$ mkdir ~/temp; cd ~/temp
$ apt-get download virtualbox-dkms
$ dpkg --extract virtualbox-dkms[...] .

However, there is no "configure" file there. I believe the virtualbox-dkms files are used when GENERATING a initramfs image or something like this.

I didn't get through that stuff, but start here: https://duckduckgo.com/?q=virtualbox-dkms

lembas
Offline
Beigetreten: 05/13/2010

Looks like this one is somehow automagically compiled by dkms.

Perhaps if one removes the virtualbox-dkms package and installs the dkms package and then re-installs the virtualbox-dkms package the auto compile would get triggered?

And then the modprobe to add the module.

If not, apparently man 8 dkms should contain answers.

technicalpickle

I am a member!

Offline
Beigetreten: 03/27/2011

lembas, GustavoCM:

Those solutions did not work for me, and doing a web search is leading me to areas that are too complicated for me to tackle. It seems my case is sufficiently atypical that the only way to (possibly) fix it would be to re-compile the kernel. Too much work.

Qemu seems to work, so I think I'll try putting my efforts toward figuring out its nuances. I don't exactly need VirtualBox, just virtualization.

Thanks for the help at any rate. Hopefully this thread helps somebody else with a more common setup.