Issues installing Oracle VM Virtual Box

After learning about Virtual Box in the Linux Beginner’s course, I decided to try it. I went to their site, did the proper download (for Ubuntu 22.04), and followed the install instructions in the User Manual. The download was a .deb file, and I don’t know if the instructions were a Flatpak install or something else, but it was Terminal script to get it installed.

During the install I got error messages. It was looking for a bunch of “libqt*****” type files. I tried manually installing those, but it didn’t work. Doing a search about it, I found this:
“Qt is a cross-platform C++ application framework. Qt’s primary feature is its rich set of widgets that provide standard GUI functionality.”
I also found this:
“The installer will also try to build kernel modules suitable for the current running kernel.”

I later found out that there’s a Snap in the Snap-Store for Oracle VM Virtual Box. In the Snap-Store it shows that I already have this Oracle VM Virtual Box installed (due to the manual attempt at install), so I guess the manual install I tried (which failed) did register the application. I also have the Oracle VM Virtual Box icon in the Applications menu. But clicking the icon does not launch anything.

So it seems I’m stuck with a partial install which I don’t know how to undo. If I could reverse what happened, and unregister the Application install, I can probably then install from Snap-Store without (hopefully) any further issues.
Can anyone give me suggestions for cleaning this up and reversing the partial install? Or how to fulfill those “libqt*****” file requirements (there were about 10 that were missing) so I can run the Terminal script installer again?

This is the site for the download and the User Manual:

You did not specify if you used dpkg or apt for the .deb manual install.

I believe what you are looking for is sudo apt remove --purge application.deb should be what you’re looking for.
Follow that up with sudo apt autoremove to clean up any useless libraries and unused kernels.

dpkg -r application.deb or dpkg --remove application.deb

Hope this helps
Can’t help with much else on Ubuntu and I do not use snaps and rarely touch flatpaks. Couple appimages.

1 Like

Here is the install instructions:
I believe I used this method:
“ Installing Oracle VM VirtualBox from a Debian or Ubuntu Package”

So it looks like it was the dpkg command.

So in that dpkg command, I would replace “application.deb” with the name of my Virtual Box install file? (which is in Downloads)

I didn’t understand this part before the install. After the errors it makes sense now. But it doesn’t explain how to install these other packages. If I can uninstall/reverse my failed install, and get the Virtual Box Snap to work, I shouldn’t have to worry about it though.

2.3.1. Prerequisites

You may need to install the following packages on your Linux system before starting the installation. Some systems will do this for you automatically when you install Oracle VM VirtualBox.

  • Qt 5.3.2 or later. Qt 5.6.2 or later is recommended.
  • SDL 1.2.7 or later. This graphics library is typically called libsdl or similar.


Been a while since I used it, but I definitely recall the need of a second file, “VBOX Guest Additions”

Also, if you haven’t already done it, in your system bios you have to enable a certain setting depending on the chip manufacturer(Intel/AMD) to allow virtualization.

1 Like

So I tried this in Terminal:
dpkg -r application.deb or dpkg --remove virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb

It told me this: “dpkg: error: requested operation requires superuser privilege”

So I tried ‘sudo’ in front of that previous line. Then it told me this:
“dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in”

ALSO these items:

  • An error message showed up in my system tray, the icon is a red circle with a white dash in the middle of it. It says this:
    “An error occurred, please run Package Manager from the right-click menu or apt-get in a Terminal to see what is wrong. The error message was: ‘Error: Broken Count>0’. This usually means that your installed packages have unmet dependencies.”

  • When I ran Software Updater it gave a list of files to update, but when I clicked ‘Install’ it told me this:
    "The package system is broken.
    Check if you are using third party repositories. If so disable them, since they are a common source of problems.
    Furthermore run the following command in a Terminal: apt-get install -f
    Transaction failed: The package system is broken
    The following packages have unmet dependencies:

virtualbox-7.0: Depends: libcurl4 (>= 7.16.2) but 7.81.0-1ubuntu1.16 is installed
Depends: libdevmapper1.02.1 (>= 2:1.02.97) but 2:1.02.175-2.1ubuntu4 is installed
Depends: libqt5core5a (>= 5.15.1) but it is not installed
Depends: libqt5dbus5 (>= 5.14.1) but it is not installed
Depends: libqt5gui5-gles (>= 5.14.1) but it is not installed
Depends: libqt5help5 (>= 5.15.1) but it is not installed
Depends: libqt5opengl5 (>= 5.0.2) but it is not installed
Depends: libqt5printsupport5 (>= 5.0.2) but it is not installed
Depends: libqt5widgets5 (>= 5.15.1) but it is not installed
Depends: libqt5x11extras5 (>= 5.6.0) but it is not installed
Depends: libqt5xml5 (>= 5.0.2) but it is not installed
Depends: libstdc++6 (>= 12) but 12.3.0-1ubuntu1~22.04 is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-2ubuntu9.2 is installed"

Also, I checked BIOS/UEFI for a ‘virtualization’ option but I don’t see one. My UEFI is American Megatrends (AMI).

You still did not specify which way you installed VB the first time, did you use dpkg or apt? Anytime you’re working with installing packages, first and foremost you should update/upgrade your systems package libraries to the latest. dpkg and apt should always be ran with sudo

Also if I’m not mistaken, Ubuntu keeps the most recent VB on their own server, though I do not know if it is a snap(which is more then likely), flatpak, appimage etc.

apt will usually pull down required libraries for a package to be installed where dpkg will only tell you of unmet dependencies during install.

The dpkg fail on the reply is due to unmet dependencies.

Try this sudo dpkg -l virtual box
If it lists the package then run sudo dpkg -rP virtualbox -y

When complete you can retry the -l above that to verify it’s no longer there.
Next you can run
sudo apt update && sudo apt list --upgradable AS ONE COMMAND.
Look at your upgrades, if you are satisified with them upgrade them with
sudo apt upgrade -y

Hopefully that will fix your broken packages, then move on with attempting VB again.

If you hit the tab key midway through a word, it will look for matching commands or even files and sub directories in the same directory you are in to save typing it out.

Instead of dpkg, open a terminal, cd to where you downloaded the VB deb to.
Run sudo apt install VirtualBox(tab key to complete) and follow the prompts.

1 Like

Thanks for being patient with me, and giving detailed instructions! :slightly_smiling_face: I thought I was trying to answer that with this statement in the earlier post:

The command listed there is this:
sudo dpkg -i virtualbox-version-number Ubuntu xenial amd64.deb
(which translated for me based on the downloaded file name:
sudo dpkg -i virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb)

It was after that I got the missing dependencies messages.

Yes, as I mentioned above, I later saw that there is a Snap in the Snap-Store. It showed as “Installed” - from my partial/broken dpkg installation, apparently. It won’t let me uninstall it from Snap-Store (which probably makes sense, since it wasn’t installed via that route), and though I have a launch icon in Applications for Virtual Box (from the failed install), it doesn’t work.
So I’m looking to resolve this partial/broken dpkg install. Either reverse it so I can then go the Snap route, or complete the dependencies so the install actually works.

Here is what that command rendered:

:~$ sudo dpkg -l virtualbox
[sudo] password for:
| 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
un virtualbox (no description available)

I don’t know if that is listing the package or not. It doesn’t make a lot of sense to me, though it seems to indicate an incomplete install.

I did “cd Downloads”, where the file is located, then tried the above. Hitting the TAB key doesn’t seem to add anything or give any prompts.

Sorry I must have missed that, I don’t usually follow links to read what it’s doing.

It looks like the Virtualbox dpkg install is gone now.

If the tab key won’t complete out a filename after a command, likely it’s gone or the wrong filename, case does matter, you can use “ls” to check once in the folder, looks like it is lowercase.

If you still have the original file available, using a terminal, cd to the directory of the downloaded file or you can just use exact location from where ever you are in the terminal.

So from same folder as file:
sudo apt install virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb

Or file with location:
sudo apt install /home/YOURUSER/home/Downloads/virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb

Followed with sudo password and then it should give you a list of dependencies or mention issues before it installs, likely with that many dependencies your going to have to to it yes to proceed.


1 Like

I tried that. Did “cd Downloads” and ran the command. It gave me an error:
**:~/Downloads$ sudo apt install virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb
[sudo] password for **:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package virtualbox-7.0_7.0.18-162988~Ubuntu~jammy_amd64.deb

I verified the file with the exact filename is in the Downloads folder. I tried a few other things and wasn’t getting anywhere.

THEN, for grins I ran that “sudo apt update && sudo apt list --upgradable” command again. There were 3 more things to install, so I said “yes”. I don’t know if those were the missing dependencies, but again for grins I decided to try clicking the Oracle VM VirtualBox icon in Applications, and … BOOM, it opened! Hallelujah!

So I’m cautiously optimistic that it’s working now. Don’t know why or how, but thankful that I made progress. Now I have to read the manual to figure out how to work it. :joy: There’s a notification that says “Can’t enumerate USB devices …”, which explains I have to add my user to the ‘vboxusers’ group (as you mentioned).

Once again, thank you so much for hanging in there with me and walking me through this! I have certainly learned to avoid dpkg and go with apt from now on.

Don’t forget the Guess additions file from their website as well.

Conratz, and enjoy.

1 Like

Just as a follow up to this thread, I have another setup with Ubuntu 22.04 - essentially a duplicate of my main Ubuntu machine. On that one, I installed the Oracle VM Virtual Box ‘Snap’ from the Snap-Store. It installed easily and doesn’t seem to have any issues so far. I’m not yet setting up VM’s though (still reading and learning), so we’ll see. But there is a difference - the Snap installed version 6.1 of Virtual Box, whereas the direct install on my main Ubuntu machine was the latest version (I believe that it is 7.0.18). In the 6.1 version, I went into the menu and clicked “Check for Upgrades”, and it replied that there were none available. So the only downside to the Snap that I can see so far, is that upgrades are only available through Snap and Software Updates (probably).