Trying to update Virtual Box in 20.04 is throwing error.

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Arunzeb
Posts: 4
Joined: 6. Jun 2020, 19:11

Trying to update Virtual Box in 20.04 is throwing error.

Post by Arunzeb »

Code: Select all

pranav@exam ~/Downloads [1]> sudo dpkg -i virtualbox-6.1_6.1.10-138449\~Ubuntu\~eoan_amd64.deb 
(Reading database ... 220352 files and directories currently installed.)
Preparing to unpack virtualbox-6.1_6.1.10-138449~Ubuntu~eoan_amd64.deb ...
Unpacking virtualbox-6.1 (6.1.10-138449~Ubuntu~eoan) over (6.1.8-137981~Ubuntu~eoan) ...
dpkg: dependency problems prevent configuration of virtualbox-6.1:
 virtualbox-6.1 depends on python (<< 2.8); however:
  Package python is not installed.
 virtualbox-6.1 depends on python (>= 2.7); however:
  Package python is not installed.
 virtualbox-6.1 depends on python:any (>= 2.6.6-7~); however:

dpkg: error processing package virtualbox-6.1 (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.15-1) ...
Errors were encountered while processing:
 virtualbox-6.1
pranav@exam ~/Downloads [1]> 
When Virtual Box is going to become Python 2 free?
Isn't it risky to hold on to old deprecated Python 2 dependencies?
For now, I am going to use VMware.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Trying to update Virtual Box in 20.04 is throwing error.

Post by scottgus1 »

Arunzeb wrote:For now, I am going to use VMware.
K, have fun!

On the Virtualbox side of this discussion, are you downloading from https://www.virtualbox.org/wiki/Linux_Downloads, or the repo instructions listed on that link, or are you getting Virtualbox from the Ubuntu distro's repo?
Arunzeb
Posts: 4
Joined: 6. Jun 2020, 19:11

Re: Trying to update Virtual Box in 20.04 is throwing error.

Post by Arunzeb »

Yes, I went to that website > download a new update of Virtual Box for Ubuntu 20.04 > tried installing it from terminal > didn't work.

Now I have two python versions installed because of this.

Code: Select all

pranav@exam ~> python --version
Python 2.7.18rc1
pranav@exam ~> python3 --version
Python 3.8.2
This is NOT good.
Everyone is leaving Python 2 starting from January. But sadly, Oracle devs are not.
Last edited by Arunzeb on 8. Jun 2020, 19:03, edited 2 times in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Trying to update Virtual Box in 20.04 is throwing error.

Post by scottgus1 »

You can post about this on the Bugtracker if you would like to. Chances are the devs know about it already.

Though Python 2 is officially withdrawn, it will be when the paying Oracle customers require Virtualbox to not use it anymore that the devs will change parts of Virtualbox relating to it.

FWIW the Virtualbox manual PDF version allows searching, and searching 'Python' shows that Virtualbox provides an API for several languages, including Python 2 and 3. There are command line instructions to not install Python API support for Windows, there may be instructions to do the same for Linux.

It is illuminating that Python API is installed on Windows, which by default does not have Python, yet Virtualbox runs on Windows without ever requiring installation of Python. If Linux Virtualbox is the same, then Virtualbox itself does not require Python 2.

It may be your distro installing Python 2 because Virtualbox has an API for it, rather than Virtualbox doing the install. It is probably the case that if you don't use the Python API you might not need Python to run Virtualbox on Linux. Try uninstalling Python 2 and see if Virtualbox still works.
Arunzeb
Posts: 4
Joined: 6. Jun 2020, 19:11

Re: Trying to update Virtual Box in 20.04 is throwing error.

Post by Arunzeb »

it will be when the paying Oracle customers require Virtualbox to not use it anymore.
Disappointing.
It may be your distro installing Python 2 because Virtualbox has an API for it, rather than Virtualbox doing the install. It is probably the case that if you don't use the Python API you might not need Python to run Virtualbox on Linux. Try uninstalling Python 2 and see if Virtualbox still works.
I don't why I doing this. But anyway, here you go:

Code: Select all

pranav@exam ~> sudo apt remove --purge python2
[sudo] password for pranav: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libpython2-stdlib python2-minimal python2.7
  python2.7-minimal
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  python-is-python2* python2* virtualbox-6.1*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 216 MB disk space will be freed.
Do you want to continue? [Y/n] 
lol

Anyway, thanks for replies. It was helpful.
Maybe I should make an "enhancement" request on the bug tracker. Maybe they will listen.
ajgreeny
Posts: 13
Joined: 20. May 2020, 21:35

Re: Trying to update Virtual Box in 20.04 is throwing error.

Post by ajgreeny »

How were you trying to install the vbox update that you say you downloaded from the Oracle site, what version was it, and assuming you were installing it in terminal, what errors did you see?

I am running VBox 6.1.10 now, having updated from 6.1.8, on Xubuntu-20.04 and the only version of python on my machine when I run python --version is 3.8.2; I do not have any python version 2 at all according to that command though if I look in synaptic I do have several python2 packages installed. Not sure why I get a different output to you.

I have been using VBox 6.1 series all the time on 20.04, never having used 6.0 on this Xubuntu version so I wonder if you are still using the 6.0 series and it is that which has python2 as a dependency.

EDIT:
Apologies. Having looked into this further using the history dialogue of synaptic I have now found that the python2 packages were indeed added as dependencies of VBox-6.1.
This does not explain why I get 3.8.2 from the python --version command instead of 2.7 as you do.
Post Reply