VirtualBox is supported by most distributions, but it may not be part of these distributions' default package repositories.
To install VirtualBox on Debian 9, you need to add the virtualbox.org repository to the sites that apt-get will accept packages from:
# vi /etc/apt/sources.list ## ADD: deb http://download.virtualbox.org/virtualbox/debian stretch contrib
The curl package is required to install the proper keys. If this is not already present, install it before adding the key and updating the repository information:
# apt-get install curl # curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc # apt-key add oracle_vbox_2016.asc # apt-get update
Once the repository is updated, you can install VirtualBox with apt-get:
# apt-get install virtualbox-5.1 OpenSuSE # zypper install gcc make kernel-devel Open yast2, select Software Management, search for virtualbox. Select virtualbox, virtualbox-host-kmp-default, and virtualbox-qt.