Install VirtualBox 7 on Debian 12

|
Last Updated:
|
|

This guide will take you through how to install VirtualBox 7 on Debian 12. VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use.

Install VirtualBox 7 on Debian 12 Desktop

VirtualBox Features Overview

VirtualBox ships with a handful of features. Read about features offered by VirtualBox 7 on Features page.

Install VirtualBox 7 on Debian 12

VirtualBox 7.0.8 is the current stable release version of VirtualBox 7 as of this writing.

There are two ways to install VirtualBox 7 on Debian 12 desktop:

  1. Install VirtualBox 7 using Linux DEB Binary
  2. Install VirtualBox 7 from VirtualBox 7 repository

Install VirtualBox 7 on Debian 12 using Linux DEB Binary

You can always download the DEB binary from the VirtualBox 7 downloads page. However, there is no official DEB binary for Debian 12 bullseye, as of this writing. We will use DEB for Debian 11 in the meantime.

wget \
https://download.virtualbox.org/virtualbox/7.0.8/virtualbox-7.0_7.0.8-156879~Debian~bullseye_amd64.deb \
-P ~/Downloads/

There are some package dependencies required to successfully install VirtualBox 7.0.8 as of this writing on Debian 12;


The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox-7.0 : Depends: libssl1.1 (>= 1.1.1) but it is not installable
                  Depends: libvpx6 (>= 1.6.0) but it is not installable
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: linux-headers-generic or
                              linux-headers-generic-pae but it is not installable or
                              linux-headers-686-pae but it is not installable or
                              linux-headers-amd64 but it is not going to be installed or
                              linux-headers-2.6-686 but it is not installable or
                              linux-headers-2.6-amd64 but it is not installable or
                              linux-headers but it is not installable
                  Recommends: linux-image but it is not installable
E: Unable to correct problems, you have held broken packages.

Thus, to circumvent this, install the following Debian 11 repository list;

echo 'deb http://ftp.de.debian.org/debian bullseye main ' | sudo tee /etc/apt/sources.list.d/debian11.list

Run system update and install VirtualBox;

sudo apt update
sudo apt install ~/Downloads/virtualbox-7.0_7.0.8-156879~Debian~bullseye_amd64.deb

After that, remove the debian 11 repos installed above;

rm -rf /etc/apt/sources.list.d/debian11.list

Install VirtualBox 7 on Debian 12 from VirtualBox 7 Repositories

The default Debian 12 repositories do not provide VirtualBox 7, at least as of this writing.

apt-cache policy virtualbox
virtualbox:
  Installed: (none)
  Candidate: (none)
  Version table:

Also, as of this writing, no official repository for Debian 12 Bullseye.Hence, run the command below to add the sources list for Debian 11 Buster.

echo \
"deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bullseye contrib" | \
sudo tee /etc/apt/sources.list.d/virtualbox.list

Next, install the repository GPG signing keys;

sudo apt install gnupg2
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | \
sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/vbox.gpg

Similarly, install this repo;

echo 'deb http://ftp.de.debian.org/debian bullseye main ' | sudo tee /etc/apt/sources.list.d/debian11.list

Next, ensure your package cache is up-to-date by running the command below;

sudo apt update

VirtualBox 7 can then be installed by running the command below;

sudo apt install  virtualbox-7.0

Running VirtualBox 7 on Debian 12

You can now start using VirtualBox 7.

Luanch;

Install VirtualBox 7 on Debian 12 Desktop
Install VirtualBox 7 on Debian 12 Desktop

What is the ROOT Password?

You might be wondering what could be the root password or how to set the password.

Well, the root password is to be same as the standard user password you created during the installation.

Simply switch to root as;

su -

Use the standard user password created before.

You can then assign your standard user account sudo rights to allow you execute administrative tasks.

usermod -aG sudo USERNAME

Uninstall VirtualBox 7 on Debian 12

If for some reasons you want to remove VirtualBox 7, run the command below.

apt remove --purge --auto-remove virtualbox-7.0

Please note that this wont delete your VMs.

You can also remove the repo list after the installation;

rm -rf /etc/apt/sources.list.d/debian11.list

And that concludes our guide on how to install VirtualBox 7 on Debian 12.

Other Tutorials

Install VirtualBox 7 Guest Additions on Debian 12

Install Debian 12 on VirtualBox 7

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
Kifarunix
Linux Certified Engineer, with a passion for open-source technology and a strong understanding of Linux systems. With experience in system administration, troubleshooting, and automation, I am skilled in maintaining and optimizing Linux infrastructure.

7 thoughts on “Install VirtualBox 7 on Debian 12”

  1. Huge Thanks!!!!! I rely heavily on this app and wasn’t able to load it after installing Deb12. Works now after using the first technique.

    Reply

Leave a Comment