![Ubuntu 19.10 上的 Virtualbox](https://linux22.com/image/917139/Ubuntu%2019.10%20%E4%B8%8A%E7%9A%84%20Virtualbox.png)
我已经下载了虚拟盒来自官方存储库。但是,我无法在 Ubuntu 19.10 上安装它:
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
它说我的配置没有某些依赖项:
dpkg -i virtualbox-6.0_6.0.14-133895~Ubuntu~bionic_amd64.deb
Selecting previously unselected package virtualbox-6.0.
(Reading database ... 183239 files and directories currently installed.)
Preparing to unpack virtualbox-6.0_6.0.14-133895~Ubuntu~bionic_amd64.deb ...
Unpacking virtualbox-6.0 (6.0.14-133895~Ubuntu~bionic) ...
dpkg: dependency problems prevent configuration of virtualbox-6.0:
virtualbox-6.0 depends on libqt5opengl5 (>= 5.0.2); however:
Package libqt5opengl5 is not installed.
virtualbox-6.0 depends on libqt5printsupport5 (>= 5.0.2); however:
Package libqt5printsupport5 is not installed.
virtualbox-6.0 depends on libqt5x11extras5 (>= 5.6.0); however:
Package libqt5x11extras5 is not installed.
virtualbox-6.0 depends on libsdl1.2debian (>= 1.2.11); however:
Package libsdl1.2debian is not installed.
virtualbox-6.0 depends on libvpx5 (>= 1.6.0); however:
Package libvpx5 is not installed.
dpkg: error processing package virtualbox-6.0 (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (242-7ubuntu3) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu1) ...
Processing triggers for mime-support (3.63ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.10-1) ...
Errors were encountered while processing:
virtualbox-6.0
运行sudo apt-get install -f
不会安装依赖项,但会删除未完成的 Virtualbox 安装。我遗漏了什么吗?
答案1
要安装官方软件包并测试您的版本的 VirtualBox,您只需要
sudo apt install virtualbox
这将导致https://packages.ubuntu.com/eoan/virtualbox要安装(注意:它位于“多元宇宙”中,因此必须启用存储库;https://help.ubuntu.com/community/Repositories/Ubuntu)
您正在尝试安装针对 bionic (18.04) 的 virtualbox 软件包,但该软件包并非 Ubuntu 19.10 (eoan) 的官方软件包。需要将其删除(如果已安装)并从官方存储库(针对 eoan)安装官方 6.0.14 软件包。
答案2
nano /etc/apt/sources.list
写在里面:
deb http://cz.archive.ubuntu.com/ubuntu disco main
使用以下快捷键保存:Ctrl+O和Ctrl+X
下一个:
apt-get update
apt-get install libvpx5
答案3
正如 guiverc 提到的,你可以用更简单的方式来做到这一点,只需
sudo apt install virtualbox
但是例如,就我而言,我有一个流浪者,它特别要求“virtualbox-5.2”
同样,您可以这样做:sudo apt install virtualbox-5.2
,但在某些情况下,它对我没有帮助。所以我尝试了Josue Badbeat
解决方案,它有所帮助。只需添加source.list
->deb http://cz.archive.ubuntu.com/ubuntu disco main
然后
apt-get update
apt-get install libvpx5
答案4
如果以上方法都不能解决您的问题,请执行以下操作
gcc 有一个 bug(参考)
sudo ln -fs gcc-8 /usr/bin/gcc
然后从下载最新版本的虚拟盒此链接或使用类型:
wget -qhttps://download.virtualbox.org/virtualbox/6.1.0/virtualbox-6.1_6.1.0-135406~Ubuntu~eoan_amd64.deb
然后,在命令 shell 中,转到下载 vritualbox 的目录,然后运行:
sudo dpkg --install virtualbox-6.1_6.1.0-135406_Ubuntu_eoan_amd64.deb