我正在尝试在我的 x86_64 架构的 Ubuntu 机器上安装 Virtual-box。
注意:VirtualBox 是为了试用 Ubuntu 风格和其他 Linux 发行版的其他变体,所以如果有比 Virtual Box 更好的工具,也欢迎提出建议。
我正在遵循Official VirtualBox Doc中的指南,
按顺序执行的步骤,
- 在sources.list中添加条目,(因为我的发行版很糟糕,它不起作用,在下面都试过了,但总体结果还是一样)
- 尝试 1
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib
- 尝试 2
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian eoan contrib
- 尝试 1
- 添加了 Oracle 公钥
- 更新的源列表
- 当我试图做
sudo apt-get install virtualbox-6.1
收到以下错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
virtualbox-6.1 : Depends: libssl1.1 (>= 1.1.1) but it is not installable
Depends: libvpx6 (>= 1.6.0) but it is not installable
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
并且无法像尝试时那样添加/安装这些依赖项sudo apt-get install libssl1.1
得到以下错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libssl1.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
E: Package 'libssl1.1' has no installation candidate
附加信息,在我要获取的“Ubuntu 软件”源中,所有 4 个轨道都已启用 main,universe, restricted, multiverse
正如@matigo 所建议的那样,默认存储库中可用的“virtualbox”可以正常工作
您可以通过以下方式安装它,
sudo apt install virtualbox
,它将列出所有要安装的依赖项然后你必须再做一项配置,在安装过程中,将显示在启动项中添加相应配置的步骤,然后它就可以作为魅力