{{Header}} {{Title|title= Install Newer Versions of VirtualBox }} {{#seo: |description=How to install different versions of VirtualBox from sources other than the default repositories, such as Debian unstable or directly from the developers of VirtualBox. |image=Otherversions-1695760640.jpg }}
* [[VirtualBox/Recommended_Version|Install the Recommended VirtualBox Version]] * [[VirtualBox/Other_Versions|Install Newer Versions of VirtualBox]]
[[File:Otherversions-1695760640.jpg|thumb]] {{intro| This wiki page documents how to install different versions of VirtualBox from sources other than the default repositories, such as Debian unstable or directly from the developers of VirtualBox. }} = Security Considerations = If using {{project_name_long}} inside a {{VM}}, the virtualization platform is an essential component of a secure {{project_name_long}} system. A vulnerable virtualizer may provide opportunities for attackers to perform a breakout from a virtual machine in order to undo the security by isolation features that {{project_name_long}} provides. The decision to install an alternative virtualizer should not be taken lightly. The two methods described below to install VirtualBox are safer than downloading, verifying, and installing binaries manually. See also [[VirtualBox/Recommended_Version|recommended VirtualBox version]]. = Newer VirtualBox Version = == Install VirtualBox from Debian Unstable == {{mbox | image = [[File:Ambox_warning_pn.svg.png|40px]] | text = '''Discouraged:''' Use the [[VirtualBox/Recommended_Version|recommended VirtualBox version]] instead. }} {{mbox | image = [[File:Ambox_warning_pn.svg.png|40px]] | text = Unknown if currently possible. Was not possible as of Debian buster. Dependencies such as for package glibc were too new. This meant a host of updated dependencies from Debian unstable wer pulled and mixed with Debian stable, often leading to many issues including system instability. }} {{Anchor|Install from Oracle Repository}} == Install from VirtualBox.org Repository == {{mbox | image = [[File:Ambox_warning_pn.svg.png|40px]] | text = '''Discouraged:''' Use the [[VirtualBox/Recommended_Version|recommended VirtualBox version]] instead. }} {{mbox | image = [[File:Ambox_warning_pn.svg.png|40px]] | text = '''Warning:''' this procedure will install a [[Install_Software#Foreign_Sources|foreign software source]]. }} {{mbox | image = [[File:Ambox_notice.png|40px]] | text = '''Info:''' The [[Self_Support_First_Policy|Self Support First Policy]] applies to this procedure. }} The latest Oracle VirtualBox package information can be found [https://www.virtualbox.org/wiki/Linux_Downloads here].
Optional: To find out which version is available from the VirtualBox.org APT Repository, please press expand on the right side.
The user could investigate the following links: * useful to start investigation at the "base link": https://download.virtualbox.org/virtualbox/debian * other more specific "hot links" at time of writing: ** https://download.virtualbox.org/virtualbox/debian/pool/contrib/v/ ** https://download.virtualbox.org/virtualbox/debian/pool/contrib/v/virtualbox-7.0/ ** https://download.virtualbox.org/virtualbox/debian/dists/{{stable project version based on Debian codename}}/contrib/binary-amd64/Packages
'''1.''' Adding the VirtualBox.org APT repository. Choose either: A '''OR''' B. {{Tab |type=controller |content= {{Tab |title= ='''A''': Use extrepo to add VirtualBox.org APT Repository= |addToClass=info-box |active=true |content= '''Step 1''' {{Install Package|package= extrepo }} '''Step 2''' {{Open with root rights |filename=/etc/extrepo/config.yaml }} '''Step 3''' Paste at the end. {{CodeSelect|code= - contrib - non-free }} The following comments in that file...
# - contrib
# - non-free
...could be deleted but that is completely optional.
'''Step 4''' Save and exit. '''Step 5''' Use extrepo to enable the VirtualBox.org APT repository. {{CodeSelect|code= sudo extrepo enable virtualbox }} If everything goes well, extrepo will just print some empty lines. '''Step 6''' Done. Adding the VirtualBox.org APT repository has been completed. }} {{Tab |title= ='''B''': Manually add VirtualBox.org APT Repository= |addToClass=info-box |content= '''Step A''' Add the Oracle apt sources list. Make sure to change {{Stable_project_version_based_on_Debian_codename}} to the current name of your stable distribution. {{CodeSelect|code= echo "deb [signed-by=/usr/share/keyrings/virtualbox-archive-keyring.asc] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" {{!}} sudo tee /etc/apt/sources.list.d/virtualbox.list }} '''Step B''' Add Oracle's signing key to APT keyring. {{apt_key_add |url=--tlsv1.2 https://www.virtualbox.org/download/oracle_vbox_2016.asc |source_filename=oracle_vbox_2016.asc |target_filename=/usr/share/keyrings/virtualbox-archive-keyring.asc |gpg_fingerprint_output=B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF }} }} }} '''2.''' Update and Install VirtualBox. '''A.''' {{Update}} {{CodeSelect|code= sudo apt update }} '''B.''' Install VirtualBox and Linux Kernel Headers, which are a dependency. {{CodeSelect|code= sudo apt install virtualbox-7.0 linux-headers-$(uname -r) }} '''C.''' Update VirtualBox guest additions. Note: After upgrading the VirtualBox host version, this '''might''' cause issues with the guest VMs such as broken VM size adjustment (full screen) [https://forums.whonix.org/t/problems-after-upgrading-whonix-cannot-full-size-whonix-workstation-screen/9647/16 Problems after upgrading {{project_name_short}} - cannot full size {{project_name_short}} screen] unless the VirtualBox guest additions are also upgraded inside your virtual machine. This is currently not the case at time of writing in August 2023. If this happens, then you could try [[VirtualBox/Guest_Additions#Migration_to_Oracle_Style_VirtualBox_Guest_Additions|Migration to Oracle Style VirtualBox Guest Additions]]. '''D.''' Done. Installation of VirtualBox from VirtualBox.org Repository has been completed. = Footnotes = {{reflist|close=1}} {{Footer}} [[Category:Documentation]]