How to Set up VirtualBox on Debian 11

Asked 2 years ago (Feb 22, 2022) in the field of Linux by Enderpace

Hello, I want to install VirtualBox in Debian 11 according to the following command.

sudo apt install virtualbox-6.1

But it gives an error. where is the problem?


Answered 2 years ago (Feb 22, 2022) by Eldernode Staff

Before install, Update all packages

sudo apt update && sudo apt upgrade

Then, you need to add Oracle public keys on the debian server.(It is used to sign debian packages).

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Also, configure the apt repository on the Debian linux server. This command adds an entry to the /etc/apt/sources.list file at end of the file.

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian contrib"

You can now install virtualbox in Debian without any problems.

sudo apt install virtualbox-6.1

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day