sudo sh -c ‘echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list‘wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -sudo apt updatesudo apt install virtualbox-5.2
-----------------------------------------分割线----------------------------
https://www.virtualbox.org/wiki/Linux_Downloads
附录:
debian-based Linux Distributions
Add the following line to your /etc/apt/sources.list. According to your distribution, replace '<mydist>' with 'artful', 'zesty', ' Yakkety', 'xenial', 'trusty', 'stretch', 'Jessie', or 'wheezy' ( Older versions of VirtualBox supported different distributions):
Deb Https://download.virtualbox.org/virtualbox/debian <mydist> Contrib
The Oracle public key for Apt-secure can downloaded
- Here for Debian 8 ("Jessie")/ Ubuntu 16.04 ("Xenial") and later
- Here for older distributions.
You can add these keys with
sudo apt-key add oracle_vbox_2016.ascsudo apt-key add ORACLE_VBOX.ASC
or combine downloading and registering:
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-
The key fingerprint for ORACLE_VBOX_2016.ASC
B9f8 D658 297A f3ef c18d 5CDF a2f6 83c5 2980 aecforacle Corporation (VirtualBox archive signing key) <[email Protec Ted]>
The key fingerprint for ORACLE_VBOX.ASC
7b0f ab3a 13b9 0743 5925 d9c9 5442 2a4b 98AB 5139Oracle Corporation (VirtualBox archive signing key) <[email Protec Ted]>
(As of VirtualBox 3.2, the signing key was changed. The old Sun public key for Apt-secure can is downloaded here.)
To install VirtualBox
sudo apt-get updatesudo apt-get install virtualbox-5.2
Replace virtualbox-5.2 by virtualbox-5.1 to install the latest VirtualBox 5.1 build.
What does when experiencing the following signatures were Invalid:badsig ... when refreshing the packages from The repository?
# sudo-s-h# apt-get clean# rm/var/lib/apt/lists/*# rm/var/lib/apt/lists/partial/*# apt-get clean# apt-get Update
Installing VirtualBox under Ubuntu 16.04 5.2