2

I want to upgrade virtualbox 4.3 to 5.0 on my precise kbuntu 12.04.05.

Problem is this is not an update what works incrementally but to do this you need to uninstall first virtualbox 4.3.

When I do the following command

 sudo aptitude remove virtualbox-4.3

I get the following information:

The following packages will be REMOVED:  
  aptdaemon{u} dkms{u} libsdl-ttf2.0-0{u} linux-headers-3.2.0-58{u} linux-headers-3.2.0-58-generic{u} linux-headers-3.2.0-64{u} linux-headers-3.2.0-64-generic{u} 
  linux-headers-3.2.0-65{u} linux-headers-3.2.0-65-generic{u} linux-headers-3.2.0-67{u} linux-headers-3.2.0-67-generic{u} linux-headers-3.2.0-68{u} 
  linux-headers-3.2.0-68-generic{u} linux-headers-3.2.0-69{u} linux-headers-3.2.0-69-generic{u} linux-headers-3.2.0-70{u} linux-headers-3.2.0-70-generic{u} 
  linux-headers-3.2.0-74{u} linux-headers-3.2.0-74-generic{u} linux-headers-3.2.0-75{u} linux-headers-3.2.0-75-generic{u} linux-headers-3.2.0-77{u} 
  linux-headers-3.2.0-77-generic{u} linux-headers-3.2.0-79{u} linux-headers-3.2.0-79-generic{u} linux-headers-3.2.0-80{u} linux-headers-3.2.0-80-generic{u} 
  linux-headers-3.2.0-84{u} linux-headers-3.2.0-84-generic{u} linux-headers-3.2.0-85{u} linux-headers-3.2.0-85-generic{u} linux-headers-3.2.0-86{u} 
  linux-headers-3.2.0-86-generic{u} linux-headers-3.2.0-87{u} linux-headers-3.2.0-87-generic{u} linux-headers-3.2.0-88{u} linux-headers-3.2.0-88-generic{u} 
  linux-headers-3.2.0-89{u} linux-headers-3.2.0-89-generic{u} linux-headers-3.2.0-90{u} linux-headers-3.2.0-90-generic{u} python-aptdaemon{u} python-defer{u} virtualbox-4.3 

Since these are so many linux headers I am afraid when I am doing this then my system will not work anymore afterwards ( already had this once ).

Is there a possibility to just delete the core virtualbox 4.3 and then install virtualbox 5 without deleting all those valuable linux librariers?

  • Linux my-pc 3.2.0-92-generic #131-Ubuntu SMP Tue Oct 20 16:16:02 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux – tangerine Nov 03 '15 at 15:36

4 Answers4

3

Completely remove the older VirtualBox 4 version before installing the version 5 of VirtualBox.

Uninstall VirtualBox 4 -> sudo apt-get purge "^virtualbox-.*"

Check carefully what will be removed before you confirm.

Update the software repositories -> sudo apt-get update

Clean up -> sudo apt-get autoremove

Download and register the ORACLE public key:

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

Add the VirtualBox repository :

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian precise contrib"

Update the software repositories again -> sudo apt-get update

Install VirtualBox 5.0 -> sudo apt-get install dkms virtualbox-5.0

Also ... there is no risk when older Linux headers will be removed.

Note for other users reading this answer, in case they use another Ubuntu edition as 12.04 :

You have to replace precise with the Ubuntu edition you are using when adding the repository.

As of Ubuntu 16.04 the ORACLE public key to download and register has changed :

oracle_vbox.asc has to be replaced with oracle_vbox_2016.asc !

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • Hi, "Check carefully what will be removed before you confirm. " is exactly what I did and I do not dare to remove this full blown list of dependencies since I had the experience one that a program provided similar dependency list, I said yes and then my system did nor work anymore after restart. That is why I am asking :) – tangerine Nov 03 '15 at 15:37
  • @tangerine : I understand ... and this is the reason why I placed the note at the end of the answer - If you still are unsure nevertheless - perform a system backup with clonezilla before ! :) – cl-netbox Nov 03 '15 at 15:41
  • I add to replace virtualbox-5 with virtualbox-5.0. – Nicolas Raoul Nov 10 '15 at 09:10
1

On removing packages aptitude will also remove packages that were installed before but are no longer used by any other package.

In your case these are old kernel headers (all are older than your presently installed kernel), dkms, libsdl-ttf2.0-0, python-aptdaemon, and python-defer.

It is safe to proceed with removing these packages. In case any package installed later will need them they will be re-installed as a dependency. I recommend however that you re-install dkms again, as we need it for keeping kernel modules installed through any future kernel updates.

After that you will be able to install a newer release of Virtual Box, either from a downloaded Debian package, or by adding the Oracle repository to your sources as was further elaborated here:

Takkat
  • 142,284
0

Hi you can safely remove Virtualbox 4.3 and it's packages with the following

sudo apt-get remove virtualbox-4.3*
sudo apt-get purge virtualbox-4.3
sudo apt-get update

then download the new version 5 and install it

RiaanV
  • 113
  • 9
0

I did the following...

My system is Debian-7.9.0 64-bit. Used Synaptic Package Manager to remove 4.3.40 version and install 5.1.4 version. It worked like a charm! BTW, I have more than 20 VM's configured. ALL nicely work in new environment.

TeWuEs
  • 1