Ubuntu: Conflict while updating virtualbox



Question:

I would like to update my virtualbox but get the error message

$ sudo dpkg -i virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb     dpkg: regarding virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb containing virtualbox-5.1:   virtualbox-5.1 conflicts with virtualbox    virtualbox-5.0 provides virtualbox and is present and installed.    dpkg: error processing archive virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb (--install):   conflicting packages - not installing virtualbox-5.1  Errors were encountered while processing:   virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb  

I understand what it means, but are not sure how to solve the issue. Should I de-install my current installation? I am afraid I might lose my settings etc.


Solution:1

I've never lost my VirtualBox guest OSs or settings when manually upgrading Oracle VirtualBox by manually uninstalling the old version and then downloading the latest version of Oracle VirtualBox and manually installing it by following the steps listed below. Your existing VirtualBox guest OS(s) will not be deleted if the version of Oracle VirtualBox is upgraded. Make sure that you also upgrade the Oracle VM VirtualBox Extension Pack so that it is the same version as whatever version of VirtualBox that is installed.

  1. Show the name of the installed virtualbox package.

    dpkg -l | grep virtualbox    

    The results of this command should be something like virtualbox-5.0

  2. Uninstall the old version of VirtualBox

    sudo dpkg -r virtualbox-5.0 # match the version of virtualbox with the results of step 1.  
  3. Download the latest version of Oracle VirtualBox for your Ubuntu release and Oracle VM VirtualBox Extension Pack from the official Oracle VirtualBox website. You might want to compare the SHA256 checksum that is provided on the download webpage to verify the integrity of the downloaded packages.

  4. Change directories using cd to the directory containing the Oracle VirtualBox .deb file that you downloaded. In your question this file is named:
    virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb

  5. Install the latest version of Oracle VirtualBox for your Ubuntu release.

    sudo dpkg -i virtualbox-5.1_5.1.22-115126~Ubuntu~trusty_amd64.deb  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »