Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to follow this tutorial.

And i have followed all the previous tutorials on this site to get where i am now. However now when i tried to install virtualbox i get some errors.

First and i ended up adding Virtual box sources twice.

How do I remove these duplicate entries? (Gksudo does not work. Cant edit the file)

When i try to run: sudo apt-get install dkms virtualbox-4.0

I get this error:

   Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox-4.0 : Depends: libpython2.6 (>= 2.6) but it is not installable
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: libhal1 (>= 0.5) but it is not going to be installed
                  Recommends: pdf-viewer
                  Recommends: python-central but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What can I do to fix this?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

The tutorial you followed is pretty old. Indicates to Ubuntu 10.10 and Ubuntu 11.04 and interferes a debian source.

Ubuntu 10.10 is EOL from April 2012 and Ubuntu 11.04 will EOL soon (tomorrow :P )

Have a look here : https://wiki.ubuntu.com/Releases

Now , to remove the duplicate entries

to remove the duplicate entries (I suggest to remove any entry relative to VirtualBox) open gedit with root permissions with this command

gksudo gedit /etc/apt/sources.list

If for any reason gksudo not working , you can use nano editor like this

sudo nano /etc/apt/sources.list

With nano editor , when you complete your changes , save the changes with this keys

combination Ctrl+X then Y(es) and then Enter

After this , run in terminal

sudo apt-get update to update the sources.list

Install Virtual-box

Two versions of VirtualBox are available in Ubuntu. The first is the Open Source Edition and you can install it with this simple command in terminal

sudo apt-get install virtualbox-ose

and the other is the closed source edition (preferred by many people) and you can download and install it from Oracle's website , here: https://www.virtualbox.org/wiki/Downloads

Summary

  • Remove the duplicate entries
  • Remove completely virtualbox with this command

sudo apt-get remove --purge virtualbox-*

  • Install virtualbox either from Ubuntu's repositories or from Oracle's website

Further informations about VirtualBox installation and configuration can be found here:

Ubuntu community wiki - VirtualBox

share|improve this answer
    
Nice answer! if i could have double accepted i would! :) –  Ole Henrik Skogstrøm Oct 27 '12 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.