Virtualbox failed to install?

21,083

Solution 1

The only thing that helped me was uninstalling virtualbox-dkms since that package was in an older version:

sudo dpkg -P virtualbox-dkms

Then I reinstalled virtualbox and it worked.

Solution 2

Run:

sudo /sbin/rcvboxdrv setup
sudo apt -f install

And if that dosen't work:

sudo /etc/init.d/vboxdrv setup 

Solution 3

I had the same problem. I wanted to install the latest version from the website, but I had an outdated Virtualbox repository version installed (by the package manager). That's why I still had some kernel modules running which were not deleted while uninstalling process. I solved it by:

apt-get remove virtualbox
apt-get autoremove [absolutely needed to remove the old kernel modules]
/sbin/vboxconfig [after you install the version from the website with dpkg -i]

Btw: Basically you should't bypass the package manager, but I couldn't run VMs and wanted to figure out if the problem exists in the latest version.

Solution 4

The easiest thing to do would be to install the version of Virtualbox that is included in the Ubuntu software repositories. In general, this is preferred over installing a downloaded version (unless you need special features that the version in the software repos doesn't offer). The version of Virtualbox in the Ubuntu 16.04 (Xenial) repos is 5.0.18-1.

First, uninstall the version of Virtualbox you downloaded.

Then open a terminal (Alt-Ctrl-T) and type the following commands:

sudo apt update
sudo apt install virtualbox

Solution 5

I had this error too. Then I found a correct way to delete old version of VirtualBox.

$ sudo /opt/VirtualBox/uninstall.sh
$ sudo rm -rf /opt/VirtualBox/

Then install VirtualBox again. It worked for me.

Share:
21,083

Related videos on Youtube

UberSteak
Author by

UberSteak

I like games and Ubuntu. Ubuntu always gives me some kind of trouble, but that's partly why I like it, its a constant learning experience. I also spend a lot of time watching Youtube videos. In my spare time, I do various workouts. There you go, some random things about me.

Updated on September 18, 2022

Comments

  • UberSteak
    UberSteak over 1 year

    I have recently downloaded Virtualbox 5, and I ran the .deb file I obtained from the website. I try to use MS-DOS 6.22 and it comes up with the error message.

     '[RTR3InitEx failed with rc=-1912 (rc=-1912)
    
     The VirtualBox kernel modules do not match this version of 
     VirtualBox. The installation of VirtualBox was apparently not 
     successful. Executing
    
     '/sbin/rcvboxdrv setup'
    
     may correct this. Make sure that you do not mix the OSE version and 
     the PUEL version of VirtualBox.
    
     where: supR3HardenedMainInitRuntime what: 4 
     VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support 
     driver doesn't match the version of the user. ]'
    

    I even tried to run the suggested command, and it failed.

  • B-Abbasi
    B-Abbasi about 7 years
    Thanks. This solution worked for me when trying to run a Virtual Machine, I uninstalled version 5.1 and run the command and it loaded the Virtual Machine perfectly.
  • anonymous2
    anonymous2 about 7 years
    Same here. Wasn't working on repo versions; had to install 5.1 to get my VM to start. Next time I started the computer, VM refused to start. Returning to Repo version fixed the problem, at least for now... :)
  • Tom Dalton
    Tom Dalton almost 7 years
    Many thanks for this - solved the issue for me after upgrading Ubuntu Trusty's distro-provided 4.x vbox package to a 5.1 package from virtualbox.org/wiki/Linux_Downloads.
  • jouell
    jouell over 6 years
    Worked for me (after moving from 5.0 to 5.2 on Ubuntu 16.04) link. All is well now.
  • tohuwawohu
    tohuwawohu over 5 years
    Helped for me, too (on updating from 5.2 to 6.0)
  • user1151080
    user1151080 almost 5 years
    This is done by sudo apt-get autoremove as recommended by Bevor's answer.
  • DKebler
    DKebler about 4 years
    I had installed 6.1.4 but then by mistake installed the extension pack via the repo instead of downloading as the repo version is for 5.x. It removed 6.14 and installed 5.x. After realizing this and re-installing 6.1.4 I ran into this issue which was caused by this dkms package and fixed per this post.