我按照多种方式安装我的 .deb 文件(从 virtualbox.org 下载的 VirtualBox amd64),并按照本文但当我输入:
sudo apt-get install virtualbox-5.1
或者运行下面的代码:
sudo apt-get install virtualbox 5.1
我收到以下错误:
E: Package 'virtualbox-5.1' has no installation candidate
更新 1:
当我输入时,sudo dpkg -i virtualbox-5.1.deb
我收到以下错误消息:
Selecting previously unselected package virtualbox-5.1.deb
(Reading database ... 193670 files and directories currently installed.)
preparing to unpack virtualbox-5.1.deb ...
Ubpacking virtualbox-5.1 (5.1.22-115126~Ubuntu~xenial) ...
dpkg: dependency problems prevent configuration of virtualbox-5.1:
virtualbox-5.1 depends on libqt5x11extras5 (>= 5.1.0); however:
Package libqt5x11extras5 is not installed.
dpkg: error processing package virtualbox-5.1 (--install):
dependency problems - leaving inconfigured
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utuls (022-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index ...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
virtualbox-5.1
更新2:
我输入时出错libqt5x11extras5
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libqt5x11extras5 is not available, but is referred to by another package.
This may mean that the package is missing, hass been obsoleted, or is only available from another source
E: Package 'libqt5x11extras5' has no installation candidate
更新 3:
当我输入时apt download libqt5x11extras5
收到此错误:
E: Can't select candidate version from package libqt5xextras5 as it has no candidate
注意:我手动下载Oracle_VM_VirtualBox_Extension_Pack-5.1.22-115126.vbox-extpack
并单击它进行安装或运行,但它运行了几秒钟然后关闭,并且显示任何内容!
当libqt5x11extras5
手动下载并尝试安装时,显示以下错误:
E: Unable to locate package libqt5x11extras5_5.5.1-3build1_amd.deb
E: Couldn't find any package by glob 'libqt5x11extras5_5.5.1-3build1_amd.deb'
E: Couldn't find any package by regex 'libqt5x11extras5_5.5.1-3build1_amd.deb'
答案1
访问官方下载适用于 Linux 主机的 VirtualBox网页。
手动下载适用于 Ubuntu 16.04 的 VirtualBox 5.1.xx for Linux AMD64 .deb 文件。更新:VCirtualBox 的最新版本现在是 5.2.xx
打开终端并将目录更改
cd
为包含您下载的 virtualbox-5.1_5.1.14-112924-Ubuntu-xenial_amd64.deb 文件的目录。安装 VirtualBox。我在 Ubuntu 16.04 中安装了 virtualbox-5.1_5.1.14-112924-Ubuntu-xenial_amd64.deb 和 libqt5x11extras5,它们都运行正常。
E: Package 'libqt5x11extras5' has no installation candidate
尝试安装 libqt5x11extras5 时收到错误消息,因此您需要单独下载 libqt5x11extras5 才能安装它。从官方 Ubuntu 下载 libqt5x11extras5AMD64 机器上的 libqt5x11extras5_5.5.1-3build1_amd64.deb 下载页面. 将 libqt5x11extras5_5.5.1-3build1_amd64.deb 粘贴到与您下载的 virtualbox-5.1_5.1.14-112924-Ubuntu-xenial_amd64.deb 文件相同的目录中。sudo apt update sudo apt install dkms sudo apt install ./libqt5x11extras5_5.5.1-3build1_amd64.deb sudo apt install ./virtualbox-5.1_5.1.14-112924-Ubuntu-xenial_amd64.deb
您可能还想下载 Oracle 的匹配扩展包,用于 virtualbox-5.1_5.1.14-112924-Ubuntu-xenial_amd64.deb,该文件名为 Oracle_VM_VirtualBox_Extension_Pack-5.1.14-112924.vbox-extpack。要安装它,请右键单击Oracle_VM_VirtualBox_Extension_Pack-5.1.14-112924.vbox-extpack文件并从弹出菜单中选择使用 Oracle VM VirtualBox 打开。Oracle VirtualBox 应用程序将打开并显示此窗口: