LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How do I fix a vboxdrv setup failure in VirtualBox? (https://www.linuxquestions.org/questions/ubuntu-63/how-do-i-fix-a-vboxdrv-setup-failure-in-virtualbox-4175544868/)

jay.phate 06-09-2015 12:03 AM

How do I fix a vboxdrv setup failure in VirtualBox?
 
Hi All, I use Dell inspiron 1440. I am trying to install Virtual box but got some errors.

To install virtualbox I downloaded one file i.e. "virtualbox-4.3_4.3.28-100309~Ubuntu~raring_amd64.deb" and used below command.

cd /home/jay/Downloads
sudo dpkg -i virtualbox-4.3_4.3.28-100309~Ubuntu~raring_amd64.deb

so the above commands installed Virtual box but when I started it got below pop-ups

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


Then I type below commands to terminal

root@jay-Inspiron-1440:~# /etc/init.d/vboxdrv setup
[sudo] password for jay:
root@jay-Inspiron-1440:~# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
root@jay-Inspiron-1440:~#

Please help me for this.

fang0654 06-09-2015 12:43 PM

You are probably missing the linux header files (used to build kernel modules). Try this:

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

then try the setup again.

273 06-09-2015 12:53 PM

How are you installing this? What are you trying to achieve?
You could type "apt-get -f install" -- may work.

yancek 06-09-2015 04:09 PM

The virtual box deb file you are downloading appears to be for Ubuntu 13.04 (identified by the 'raring' in the name) and it hasn't been supported for well over a year which may be the cause of the problem installing kernel module. Are you using 13.04? If so, best to upgrade to a currently supported system. Have you tried installing from the Software Center or with apt-get if you are using a current Ubuntu?

jay.phate 06-09-2015 09:20 PM

Quote:

Originally Posted by fang0654 (Post 5374729)
You are probably missing the linux header files (used to build kernel modules). Try this:

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

then try the setup again.


Well, First I removed installed virtualbox using below command
sudo apt-get remove virtualbox-\*
Then I tried your solution but got error, please see below
jay@jay-Inspiron-1440:~/Downloads$ sudo apt-get install linux-headers=$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '3.13.0-53-generic' for 'linux-headers' was not found
jay@jay-Inspiron-1440:~/Downloads$

jay.phate 06-09-2015 09:28 PM

Quote:

Originally Posted by yancek (Post 5374811)
The virtual box deb file you are downloading appears to be for Ubuntu 13.04 (identified by the 'raring' in the name) and it hasn't been supported for well over a year which may be the cause of the problem installing kernel module. Are you using 13.04? If so, best to upgrade to a currently supported system. Have you tried installing from the Software Center or with apt-get if you are using a current Ubuntu?

Sir, I am using ubuntu14.04 trusty. And the installed virtualbox has suport for this version, below is the url which says it
https://www.virtualbox.org/wiki/Linux_Downloads

The I tried to install using apt-get but some type of error I got, below is the output from command line

jay@jay-Inspiron-1440:~/Downloads$ sudo apt-get install -f virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
virtualbox-dkms virtualbox-qt
Suggested packages:
virtualbox-guest-additions-iso vde2
The following NEW packages will be installed:
virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 3 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/20.6 MB of archives.
After this operation, 84.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package virtualbox.
(Reading database ... 279903 files and directories currently installed.)
Preparing to unpack .../virtualbox_4.3.10-dfsg-1ubuntu5_amd64.deb ...
Unpacking virtualbox (4.3.10-dfsg-1ubuntu5) ...
Selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../virtualbox-dkms_4.3.10-dfsg-1ubuntu5_all.deb ...
Unpacking virtualbox-dkms (4.3.10-dfsg-1ubuntu5) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_4.3.10-dfsg-1ubuntu5_amd64.deb ...
Unpacking virtualbox-qt (4.3.10-dfsg-1ubuntu5) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up virtualbox (4.3.10-dfsg-1ubuntu5) ...
* Stopping VirtualBox kernel modules [ OK ]
* Starting VirtualBox kernel modules * No suitable module for running kernel found
[fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-dkms (4.3.10-dfsg-1ubuntu5) ...
Loading new virtualbox-4.3.10 DKMS files...
First Installation: checking all kernels...
Building only for 3.13.0-53-generic
Building initial module for 3.13.0-53-generic
Done.

vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

depmod....

DKMS: install completed.
* Stopping VirtualBox kernel modules [ OK ]
* Starting VirtualBox kernel modules * modprobe vboxdrv failed. Please use 'dmesg' to find out why
[fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
Setting up virtualbox-qt (4.3.10-dfsg-1ubuntu5) ...
jay@jay-Inspiron-1440:~/Downloads$

JimKyle 06-10-2015 10:51 AM

Quote:

Originally Posted by jay.phate (Post 5374901)
Well, First I removed installed virtualbox using below command
sudo apt-get remove virtualbox-\*
Then I tried your solution but got error, please see below
jay@jay-Inspiron-1440:~/Downloads$ sudo apt-get install linux-headers=$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '3.13.0-53-generic' for 'linux-headers' was not found
jay@jay-Inspiron-1440:~/Downloads$

Fang had a typing error in the command sent to you: the "=" that I highlighted in red should have been a hyphen; this can happen quite easily!

The "Raring" packages are the latest available and are working just fine here under 14.04 LTS so that's a bit of a red herring.

jay.phate 06-10-2015 11:25 AM

Quote:

Originally Posted by JimKyle (Post 5375138)
Fang had a typing error in the command sent to you: the "=" that I highlighted in red should have been a hyphen; this can happen quite easily!

The "Raring" packages are the latest available and are working just fine here under 14.04 LTS so that's a bit of a red herring.

Thanks @Jim, I am executed the command again, below is the output but it doesn't work.

jay@jay-Inspiron-1440:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.13.0-53-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
jay@jay-Inspiron-1440:~$

JimKyle 06-10-2015 01:58 PM

That indicates that you do have the required headers, so now you can try the
Code:

sudo /etc/init.d/vboxdrv setup
command again to create the driver.

If it still fails, then look in "/var/log/vbox-install.log" to get more information about what went wrong, and copy its content to a reply here for the rest of us to see.

jay.phate 06-10-2015 09:57 PM

Quote:

Originally Posted by JimKyle (Post 5375233)
That indicates that you do have the required headers, so now you can try the
Code:

sudo /etc/init.d/vboxdrv setup
command again to create the driver.

If it still fails, then look in "/var/log/vbox-install.log" to get more information about what went wrong, and copy its content to a reply here for the rest of us to see.

Below are some reply, but it doesnt work at all, I am really frustrated now . It may be some issue with Kernel Module.
jay@jay-Inspiron-1440:~$ sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
jay@jay-Inspiron-1440:~$

The log from"/var/log/vbox-install.log" ->
"Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.3.28

-------- Uninstall Beginning --------
Module: vboxhost
Version: 4.3.28
Kernel: 3.13.0-53-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-53-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-53-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-53-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/3.13.0-53-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

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

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

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.13.0-53-generic -C /lib/modules/3.13.0-53-generic/build M=/var/lib/dkms/vboxhost/4.3.28/build.................
cleaning build area....

DKMS: build completed.

vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-53-generic/updates/dkms/

depmod....

DKMS: install completed."

JimKyle 06-11-2015 10:37 AM

Quote:

Originally Posted by jay.phate (Post 5375394)
Below are some reply, but it doesnt work at all, I am really frustrated now . It may be some issue with Kernel Module.
Code:

jay@jay-Inspiron-1440:~$ sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...failed!
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
jay@jay-Inspiron-1440:~$


If you have a file named "vbox-setup-log" in the "/var/log" directory, it may give us some hints. All that I can deduce from the report and the log in your latest attempt is that the "vboxdrv.so" file already exists, and consequently no new one was built during the setup -- but I've never had one appear automagically when installing or updating vbox. I've always had to build the whole set of vbox drive modules (those listed in the install log) using DKMS so that the build is automatic, and I've had to do this each time I've updated vbox to a new version.

Incidentally, 4.3.28 is the current version, so being outdated isn't a problem.

I'm tempted to recommend
Code:

sudo apt-get purge virtualbox-4.3
followed by re-installing once more from the vbox site; the "purge" rather than "remove" command to apt-get is supposed to get rid of all configuration files. The "remove" leaves the configuration files alone in anticipation that you might have customized them and plan to re-install the package.

However I'm not sure where in the file system the modules are stored, nor do I know for certain that "purge" will remove associated modules. You can find out exactly which vbox modules exist in your system, though, with the "sudo lsmod|grep vbox" command, which lists module name, size in bytes, how many it depends upon, and their names.

Here's the result on my system here, which has the same vbox version and kernel version as you:
Code:

jk@mehitabel:~$ sudo lsmod|grep vbox
vboxpci                23194  0
vboxnetadp            25670  0
vboxnetflt            27613  0
vboxdrv              410016  3 vboxnetadp,vboxnetflt,vboxpci

You can compare yours to these; any differences would be worth investigating.

Sorry I can't be more specific! Your situation is one I've not seen nor heard of in the almost seven years I've been using VirtualBox!!!

jay.phate 06-11-2015 09:04 PM

Quote:

Originally Posted by JimKyle (Post 5375650)
If you have a file named "vbox-setup-log" in the "/var/log" directory, it may give us some hints. All that I can deduce from the report and the log in your latest attempt is that the "vboxdrv.so" file already exists, and consequently no new one was built during the setup -- but I've never had one appear automagically when installing or updating vbox. I've always had to build the whole set of vbox drive modules (those listed in the install log) using DKMS so that the build is automatic, and I've had to do this each time I've updated vbox to a new version.

Incidentally, 4.3.28 is the current version, so being outdated isn't a problem.

I'm tempted to recommend
Code:

sudo apt-get purge virtualbox-4.3
followed by re-installing once more from the vbox site; the "purge" rather than "remove" command to apt-get is supposed to get rid of all configuration files. The "remove" leaves the configuration files alone in anticipation that you might have customized them and plan to re-install the package.

However I'm not sure where in the file system the modules are stored, nor do I know for certain that "purge" will remove associated modules. You can find out exactly which vbox modules exist in your system, though, with the "sudo lsmod|grep vbox" command, which lists module name, size in bytes, how many it depends upon, and their names.

Here's the result on my system here, which has the same vbox version and kernel version as you:
Code:

jk@mehitabel:~$ sudo lsmod|grep vbox
vboxpci                23194  0
vboxnetadp            25670  0
vboxnetflt            27613  0
vboxdrv              410016  3 vboxnetadp,vboxnetflt,vboxpci

You can compare yours to these; any differences would be worth investigating.

Sorry I can't be more specific! Your situation is one I've not seen nor heard of in the almost seven years I've been using VirtualBox!!!


Thank You Sir for your reply. But There is no vbox-setup-log" in the "/var/log" directory, and I checked the output of sudo lsmod|grep vbox which is nothing,

jay@jay-Inspiron-1440:~$ sudo lsmod | grep vbox
jay@jay-Inspiron-1440:~$

JimKyle 06-11-2015 10:43 PM

Try this and post the result:
Code:

sudo find / -iname vbox*.ko
This may give us some leads; hopefully a few others will come back to the thread and offer some ideas.

That command should, hopefully, reveal a path to the mysterious modules, although I'm still not certain whether the *.ko files are the actual modules, since the ones I found here are nowhere hear the same size as the modules shown by "lsmod" as I posted above...

jay.phate 06-11-2015 10:51 PM

Quote:

Originally Posted by JimKyle (Post 5375902)
Try this and post the result:
Code:

sudo find / -iname vbox*.ko
This may give us some leads; hopefully a few others will come back to the thread and offer some ideas.

That command should, hopefully, reveal a path to the mysterious modules, although I'm still not certain whether the *.ko files are the actual modules, since the ones I found here are nowhere hear the same size as the modules shown by "lsmod" as I posted above...

Here is the optput -->
jay@jay-Inspiron-1440:~$ sudo find / -iname vbox*.ko
[sudo] password for jay:
/lib/modules/3.8.0-35-generic/misc/vboxdrv.ko
/lib/modules/3.8.0-35-generic/misc/vboxnetadp.ko
/lib/modules/3.8.0-35-generic/misc/vboxnetflt.ko
/lib/modules/3.8.0-35-generic/misc/vboxpci.ko
/lib/modules/3.13.0-54-generic/updates/dkms/vboxdrv.ko
/lib/modules/3.13.0-54-generic/updates/dkms/vboxnetadp.ko
/lib/modules/3.13.0-54-generic/updates/dkms/vboxnetflt.ko
/lib/modules/3.13.0-54-generic/updates/dkms/vboxpci.ko
/var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxdrv.ko
/var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxnetadp.ko
/var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxnetflt.ko
/var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxpci.ko
jay@jay-Inspiron-1440:~$

jay.phate 06-11-2015 11:01 PM

Quote:

Originally Posted by JimKyle (Post 5375902)
Try this and post the result:
Code:

sudo find / -iname vbox*.ko
This may give us some leads; hopefully a few others will come back to the thread and offer some ideas.

That command should, hopefully, reveal a path to the mysterious modules, although I'm still not certain whether the *.ko files are the actual modules, since the ones I found here are nowhere hear the same size as the modules shown by "lsmod" as I posted above...

Here is the optput -->
Code:

jay@jay-Inspiron-1440:~$ sudo find / -iname vbox*.ko
 [sudo] password for jay:
 /lib/modules/3.8.0-35-generic/misc/vboxdrv.ko
 /lib/modules/3.8.0-35-generic/misc/vboxnetadp.ko
 /lib/modules/3.8.0-35-generic/misc/vboxnetflt.ko
 /lib/modules/3.8.0-35-generic/misc/vboxpci.ko
 /lib/modules/3.13.0-54-generic/updates/dkms/vboxdrv.ko
 /lib/modules/3.13.0-54-generic/updates/dkms/vboxnetadp.ko
 /lib/modules/3.13.0-54-generic/updates/dkms/vboxnetflt.ko
 /lib/modules/3.13.0-54-generic/updates/dkms/vboxpci.ko
 /var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxdrv.ko
 /var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxnetadp.ko
 /var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxnetflt.ko
 /var/lib/dkms/vboxhost/4.3.28/3.13.0-54-generic/x86_64/module/vboxpci.ko
 jay@jay-Inspiron-1440:~$



All times are GMT -5. The time now is 03:36 PM.