0

I am having an issue with installing virtualbox 6.1 using apt with Ubuntu 20.04 OS. I used this tutorial to get all the way to the last step with the command

$ sudo apt install virtualbox-6.1

which is giving me an error of

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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-6.1 : Depends: python (< 2.8) but it is not installable Depends: python (>= 2.7) but it is not installable Depends: python:any (>= 2.6.6-7~) Recommends: libsdl-ttf2.0-0 but it is not installable E: Unable to correct problems, you have held broken packages.

The apt-cache policy virtualbox-6.1 is this.

  Installed: (none)
  Candidate: 6.1.18-142142~Ubuntu~eoan
  Version table:
     6.1.18-142142~Ubuntu~eoan 500
        500 https://download.virtualbox.org/virtualbox/debian eoan/contrib amd64 Packages
     6.1.16-140961~Ubuntu~eoan -1
        100 /var/lib/dpkg/status

It is still having the python issue it looks like

$ python --version
Python 3.8.5
$ python3 --version
Python 3.8.5
$ dpkg -l python
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================================================
rc  python         2.7.17-1     amd64        interactive high-level object-oriented language (Python2 version)
$ dpkg -l python3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Architecture Description
+++-==============-==============-============-=========================================================================
ii  python3        3.8.2-0ubuntu2 amd64        interactive high-level object-oriented language (default python3 version)
Jakob Lenfers
  • 1,105
  • 7
  • 17

1 Answers1

2

Try this...

sudo apt autoremove --purge virtualbox*

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian lsb_release -sc contrib" | sudo tee --append /etc/apt/sources.list.d/virtualbox.list

sudo apt instal virtualbox-6.1

Enterprise
  • 12,792