Upgrading VirtualBox using a `.deb`

2

0

I'm trying to upgrade VirtualBox using a .deb:

sudo dpkg -i ~/downloads/virtualbox-4.3_4.3.12-93733\~Debian\~wheezy_amd64.deb

but it fails with:

dpkg: regarding .../virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb containing virtualbox-4.3: virtualbox-4.3 conflicts with virtualbox
virtualbox-4.2 provides virtualbox and is present and installed.

dpkg: error processing /home/atc/downloads/virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb (--install): conflicting packages - not installing virtualbox-4.3 Errors were encountered while processing: /home/atc/downloads/virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb

According to searches and documentation, the -i flag to dpkg should upgrade if it's installed, but as the error suggests that won't work in this scenario.

How do I upgrade the package in this example? I'd prefer not to remove VirtualBox first. Furthermore, I know rpm has the --upgrade flag for this. Is there something similar in dpkg?

Alex

Posted 2014-07-01T09:18:54.350

Reputation: 33

Did you try with --update-avail? Here there is the solution with apt-get install: they report some conflicts between 4.2 and 4.3. So I'm afraid you should remove it before. Remove only virtualbox not the virtual machine! :-) If that computer is offline You can always download the packages and install with apt-get with a temporary cache directory

– Hastur – 2014-07-01T10:51:15.350

--update-avail didnt' help either. It still complained. I'll just have to remove & reinstall. – Alex – 2014-07-02T06:57:26.807

AFAIR 'vanilla' virtualbox.org packages are created in such a way, that virtualbox-X.N and virtualbox-X.M are unrelated (but conflicting), so you will have to remove *-4.2 first. – barti_ddu – 2014-07-02T09:21:40.893

Answers

0

The error you see tell you that dpkg cannot install for a conflict with the previous version.

dpkg: error processing /home/atc/downloads/virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb (--install): conflicting packages - not installing virtualbox-4.3 Errors were encountered while processing: /home/atc/downloads/virtualbox-4.3_4.3.12-93733~Debian~wheezy_amd64.deb

Seldom and with a lot of work it's possible to overcame such kind of conflict doing a private installation, in a local directory and for one user. I will not suggest to follow that way until you are forced to. I will not suggest because you have to solve the conflicts one by one, and by hand, and it's moreover possible that you have to do it again each time you want to do an update.

How to update

Following the instruction you can find for debian based system on the virtualbox site, you can download the Oracle public key for apt-secure and install with this command

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

After you added the key[1] you can run

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

This should not affect your actual virtual machine, even if it's possible you need to update the guest addition for them.

Notes:

  1. If you have problem to add the key probably you need to install dkms package with
    sudo apt-get install dkms

  2. It's possible that you need to download and install again the extension pack.
    If you want to do it from command line:

    VBoxManage extpack install [--replace] <extension pack>

    You have to replace <extension pack> with the path to your downloaded extension pack and to use the option --replace in case you have already installed a previous version of the extension pack.

Hastur

Posted 2014-07-01T09:18:54.350

Reputation: 15 043