13

Trying to upgrade from Virtualbox 4.2 to 4.3, receiving error

"Breaks existing package 'virtualbox-4.2' that conflict: 'virtualbox'..."

3 Answers 3

21

In order to be able to upgrade Virtual Box to a higher major release (e.g. 4.2.x to 4.3.x) we will have to remove the kernel modules and applications of an old version first. This will not affect our virtual machines.

In case you had installed from the Oracle repository you can - after having updated the apt cache - just run the following commands:

sudo apt-get purge virtualbox-4.2
sudo apt-get install virtualbox-4.3

After upgrading we will also have to download and re-install the extension packs in case we need them. Also it is advisable to update the guest additions in our virtual machines.

2
  • Worked for me +1 Jul 3, 2017 at 8:35
  • 1
    Worked for me in 2019.
    – DMellon
    Jul 28, 2019 at 7:50
3

This issue is also resolved for VirtualBox-5.0 to Virtualbox-5.1

sudo apt-get purge virtualbox-5.0

Then download the virtualbox-5.1 with your Ubuntu version and bit level

Right-click on the file and install via Ubuntu Software Center.

Don't forget to get the extension packs @ www.virtualbox.org/wiki/Downloads Install them via Virtualbox under File/Preferences then Extensions tab on the left.

Every virtual machine will then come back!

2

Try to remove and then install it with

sudo apt-get purge virtualbox-*

if there wasn't a package to remove then try to install it:

sudo apt install virtualbox-5.1.8

if there wasn't a package then try to add it by using a PPA:

echo 'deb http://download.virtualbox.org/virtualbox/debian xenial contrib' | sudo tee -a /etc/apt/sources.list

According to your distribution, replace xenial with trusty, precise, etc. You can add these keys with

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

To install VirtualBox, do

sudo apt-get update && sudo apt-get install virtualbox-5.1

Source

1
  • 1
    Solution still valid and working for Ubuntu 16.04, and Virtual Box 5.0→5.1 ... (just to give googlers some assurance)
    – Frank N
    Oct 3, 2017 at 7:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .