How can I Configure Linux Mint 17 to get the latest VirtualBox

738 Views Asked by At

How can I configure Linux Mint 17 (64bits) so I can get the latest version of Virtual-box (which is by now 4.3.18) via aptitude?

aptitude show virtualbox-4.3:amd64 shows that only the 4.3.12 version is available in the repos.

The way I've set it up is (like mentioned in the official VB docs) by adding the "trusty repo" to my sources.list .I guess this should get me the latest updates. But still the same problem!

I activated the unstable Romeo channel via the Settings>Software Sources .Still the same problem; Not getting the latest update.

Again, I want to get the latest updates via aptitude not by installing the .deb package. So, please. any thoughts how to do that?


PS: I have set my actual VB installation to check for updates daily, and get All New Releases AND Pre-Releases

2

There are 2 best solutions below

0
On BEST ANSWER

That happens because there is another package with the same name in another repository which apt considers to have higher priority. For example if you run

> apt-cache policy virtualbox-4.3

it will output something along the lines of

virtualbox-4.3:
  Installed: 4.3.12-93733~Ubuntu~raring
  Candidate: 4.3.12-93733~Ubuntu~raring
  Version table:
    4.3.20-96996~Ubuntu~raring 0
        500 http://download.virtualbox.org/virtualbox/debian/ trusty/contrib amd64 Packages
*** 4.3.12-93733~Ubuntu~raring 0
        700 http://extra.linuxmint.com/ qiana/main amd64 Packages
        100 /var/lib/dpkg/status

which means that the 4.3.12 version is installed and won't be upgraded to 4.3.20 even though this version is available from the official repo.

Now, there are several ways to solve this. A simple one is to create a

> /etc/apt/preferences.d/virtualbox-org.pref

file with the following content

Package: *
Pin: origin download.virtualbox.org
Pin-Priority: 800

Running the command again will output

virtualbox-4.3:
  Installed: 4.3.12-93733~Ubuntu~raring
  Candidate: 4.3.20-96996~Ubuntu~raring
  Version table:
     4.3.20-96996~Ubuntu~raring 0
        800 http://download.virtualbox.org/virtualbox/debian/ trusty/contrib amd64 Packages
 *** 4.3.12-93733~Ubuntu~raring 0
        700 http://extra.linuxmint.com/ qiana/main amd64 Packages
        100 /var/lib/dpkg/status

which now shows 4.3.20 as a candidate for installation. Run

> sudo aptitude install virtualbox-4.3

4.3.20 will be installed and you'll be happy forever.

If you want to begin learning how this magic works take a look at https://help.ubuntu.com/community/PinningHowto

1
On

Just follow my steps

You have to Edit Source list

sudo /etc/apt/sources.list

Add this line at the End

deb http://download.virtualbox.org/virtualbox/debian trusty contrib

Save and close it

In terminal download key by:

$ wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc

$ sudo apt-key add oracle_vbox.asc

$ sudo apt-get update

$ sudo apt-get install virtualbox-4.3

Now you will have latest Virtualbox.