如何安装 virtualbox 5.1

如何安装 virtualbox 5.1

我正在尝试安装 VirtualBox 5.1

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package virtualbox-5.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
W: Target DEP-11 (main/dep11/Components-i386.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:1 and /etc/apt/sources.list.d/google-chrome.list:2
E: Package 'virtualbox-5.1' has no installation candidate

发生了什么?

答案1

按照下面的链接操作。这将解决您的问题。我昨天也做了同样的步骤。请同时告知操作系统版本。

sudo nano /etc/apt/sources.list

并在其中插入以下行

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

然后运行命令sudo apt-get update

然后以下命令

sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-5.1 dkms

然后点击以下链接

https://www.howtoforge.com/tutorial/running-virtual-machines-with-virtualbox-5.1-on-a-headless-ubuntu-16.04-lts-server/

相关内容