0

I tried to install Virtualbox on linux

Mint version 19, 
Code name : Tara,
PackageBase : Ubuntu Bionic
Cinnamon (64-bit)

Reference link

Downloaded this version of linux from above reference link- VirtualBox 5.2.18 for Linux Ubuntu 18.04 / Debian 10 AMD64

First ran the command: sudo apt-get update

and then tried below command

xxxxxxxxxx:~/Downloads$ sudo dpkg -i virtualbox-5.2_5.2.18-124319_Ubuntu_bionic_amd64.deb 
(Reading database ... 273616 files and directories currently installed.)
Preparing to unpack virtualbox-5.2_5.2.18-124319_Ubuntu_bionic_amd64.deb ...
Unpacking virtualbox-5.2 (5.2.18-124319~Ubuntu~bionic) over (5.2.18-124319~Ubuntu~bionic) ...
dpkg: dependency problems prevent configuration of virtualbox-5.2:
 virtualbox-5.2 depends on libqt5opengl5 (>= 5.0.2); however:
  Package libqt5opengl5 is not installed.
 virtualbox-5.2 depends on libqt5printsupport5 (>= 5.0.2); however:
  Package libqt5printsupport5 is not installed.
 virtualbox-5.2 depends on libqt5x11extras5 (>= 5.6.0); however:
  Package libqt5x11extras5 is not installed.

dpkg: error processing package virtualbox-5.2 (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint3) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.9-2) ...
Errors were encountered while processing:
 virtualbox-5.2

How to make sure virtualbox gets installed on linux mint.

Prashant Pokhriyal
  • 3,727
  • 4
  • 28
  • 40
Shivraj
  • 462
  • 2
  • 9
  • 27
  • As you can see there is dependencies issue, first, try to install those dependencies. You have to install `libqt5opengl5`, `libqt5printsupport5` and `libqt5x11extras5`. There may be chances that while installing these libs, they may depend on other libraries. – Prashant Pokhriyal Sep 28 '18 at 04:01
  • @PrashantPokhriyal I saw that dependency error. However, shouldn't all this be taken care during installation by itself? – Shivraj Sep 28 '18 at 16:37
  • @PrashantPokhriyal Nevermind I installed missing dependencies. DO check the answer posted – Shivraj Sep 28 '18 at 17:54
  • I'm voting to close this question as off-topic because it is not about programming, but about Linux usage. I suggest to re-ask this question on https://unix.stackexchange.com . – peterh Oct 01 '18 at 00:51
  • @peterh you are right that this topic is about linux usage, but not every question asked on stackoverflow is about programming. I am not much familiar with the link you have provided. You are free to link this issue on that site. – Shivraj Oct 01 '18 at 01:43
  • @ShivrajJadhav Unfortunately, all questions on the StackOverflow are about programming - if not, it is either a review mistake, or it is only matter of time. The probability of your question would remain here opened, is very low. In my opinion, the best option would be to simply move your question there, but it couldn't happen on various reasons. Check the Unix SE, it is a sister site of the StackOverflow (and they are driven by the same company, this is why it is okay to link it here). – peterh Oct 01 '18 at 01:59

1 Answers1

1

I tried to install missing dependencies using command: sudo apt-get install -f

Then removed package using command:

xxxxxxxx:~/Downloads$ sudo dpkg -r virtualbox-5.2
(Reading database ... 273637 files and directories currently installed.)
Removing virtualbox-5.2 (5.2.18-124319~Ubuntu~bionic) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint3) ...
Processing triggers for mime-support (3.60ubuntu1) ...

Then following command is used to purge package completely

xxxxxxxx:~/Downloads$ sudo dpkg -P virtualbox-5.2
(Reading database ... 272816 files and directories currently installed.)
Purging configuration files for virtualbox-5.2 (5.2.18-124319~Ubuntu~bionic) ...

and then re-ran dpkg install command.

xxxxxxxxxx:~/Downloads$ sudo dpkg -i virtualbox-5.2_5.2.18-124319_Ubuntu_bionic_amd64.deb 
(Reading database ... 273638 files and directories currently installed.)
Preparing to unpack virtualbox-5.2_5.2.18-124319_Ubuntu_bionic_amd64.deb ...
Unpacking virtualbox-5.2 (5.2.18-124319~Ubuntu~bionic) over (5.2.18-124319~Ubuntu~bionic) ...
Setting up virtualbox-5.2 (5.2.18-124319~Ubuntu~bionic) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint3) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.9-2) ...

I don't see dependencies error. TO check if it is installed,

xxxxxxxxx:~/Downloads$ dpkg -l | grep 'virtualbox'
ii  virtualbox-5.2                             5.2.18-124319~Ubuntu~bionic         amd64        Oracle VM VirtualBox
Shivraj
  • 462
  • 2
  • 9
  • 27