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?

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,491
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
  • 144,580
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
  • 223
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