尝试在 ubuntu 19.10 上安装 Virtualbox,但使用后sudo apt install virtualbox
再次出现相同的错误。有人能帮我解决这个问题并安装它吗?
`Reading package lists... Done
Building dependency tree
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-qt : Depends: virtualbox (= 6.0.14-dfsg-1)
Depends: libqt5core5a (>= 5.12.2) but it is not installable
Depends: libqt5gui5 (>= 5.3.0) but it is not installable or
libqt5gui5-gles (>= 5.3.0) but it is not installable
Depends: libqt5opengl5 (>= 5.0.2) but it is not installable
Depends: libqt5printsupport5 (>= 5.0.2) but it is not installable
Depends: libqt5widgets5 (>= 5.11.0~rc1) but it is not installable
Depends: libqt5x11extras5 (>= 5.6.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
`
运行后sudo add-apt-repository multiverse && sudo apt-get update
,输出为:-
'multiverse' distribution component enabled for all sources.
Hit:1 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu eoan InRelease
Hit:2 http://ppa.launchpad.net/linuxuprising/java/ubuntu eoan InRelease
Hit:3 http://download.virtualbox.org/virtualbox/debian eoan InRelease
Hit:4 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu eoan InRelease
Hit:5 http://ppa.launchpad.net/persepolis/ppa/ubuntu eoan InRelease
Hit:6 https://download.sublimetext.com apt/stable/ InRelease
Get:7 http://archive.ubuntu.com/ubuntu eoan InRelease [255 kB]
Get:8 http://archive.ubuntu.com/ubuntu eoan/multiverse amd64 Packages [153 kB]
Get:9 http://archive.ubuntu.com/ubuntu eoan/multiverse i386 Packages [141 kB]
Get:10 http://archive.ubuntu.com/ubuntu eoan/multiverse Translation-en [111 kB]
Get:11 http://archive.ubuntu.com/ubuntu eoan/multiverse amd64 DEP-11 Metadata [51.1 kB]
Get:12 http://archive.ubuntu.com/ubuntu eoan/multiverse DEP-11 48x48 Icons [7,665 B]
Get:13 http://archive.ubuntu.com/ubuntu eoan/multiverse DEP-11 64x64 Icons [229 kB]
Get:14 http://archive.ubuntu.com/ubuntu eoan/multiverse amd64 c-n-f Metadata [9,424 B]
Fetched 957 kB in 10s (96.9 kB/s)
Reading package lists... Done
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian eoan InRelease' doesn't support architecture 'i386'
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
Hit:1 http://archive.ubuntu.com/ubuntu eoan InRelease
Hit:2 http://download.virtualbox.org/virtualbox/debian eoan InRelease
Hit:3 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu eoan InRelease
Hit:4 https://download.sublimetext.com apt/stable/ InRelease
Hit:5 http://ppa.launchpad.net/linuxuprising/java/ubuntu eoan InRelease
Hit:6 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu eoan InRelease
Hit:7 http://ppa.launchpad.net/persepolis/ppa/ubuntu eoan InRelease
Reading package lists... Done
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian eoan InRelease' doesn't support architecture 'i386'
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/oracle-virtualbox.list:1
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/virtualbox.list:1
dkms 状态为
rtlwifi-new, 0.6, 5.3.0-18-generic, x86_64: installed
dpkg-l 命令虚拟盒是
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================-============-============-=========================
un virtualbox-guest-dkms <none> <none> (no description available
un virtualbox-guest-modules <none> <none> (no description available
的输出grep -i virtualbox /etc/apt/sources.list
是
# deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian eoan contrib
的输出grep -i virtualbox /etc/apt/sources.list.d/*.list
是
/etc/apt/sources.list.d/oracle-virtualbox.list:deb http://download.virtualbox.org/virtualbox/debian eoan contrib /etc/apt/sources.list.d/virtualbox.list:deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian eoan contrib
的输出sudo apt-get install virtualbox-6.1
是
Reading package lists... Done
Building dependency tree
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: libqt5core5a (>= 5.12.2) but it is not going to be installed
Depends: libqt5gui5 (>= 5.4.0) but it is not going to be installed or
libqt5gui5-gles (>= 5.4.0) but it is not going to be installed
Depends: libqt5opengl5 (>= 5.0.2) but it is not going to be installed
Depends: libqt5printsupport5 (>= 5.0.2) but it is not going to be installed
Depends: libqt5widgets5 (>= 5.12.2) but it is not going to be installed
Depends: libqt5x11extras5 (>= 5.6.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
编辑此文件...
sudo -H gedit /etc/apt/sources.list
# 主要来源.列表
并将其更改为:
# deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian eoan contrib
对此:
deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian eoan contrib
并删除这两个文件...
sudo rm -i /etc/apt/sources.list.d/oracle-virtualbox.list
# 复制
sudo rm -i /etc/apt/sources.list.d/virtualbox.list
# 复制
安装 virtualbox-6.1...
sudo apt-get update
# 更新软件数据库
sudo apt-get install virtualbox-6.1
# 安装虚拟机
更新#1:
在安装 Virtualbox 步骤之前,我们必须修复一些被保留/损坏的软件包,然后我们必须打开Software & Updates
并启用所有适当的 Ubuntu 存储库。
答案2
似乎你的源已损坏。检查命令“sudo apt update”是否能解决此问题。
但请记住,ubuntu 存储库中的 VBox 已经过时了。最好从 Oracle 存储库安装 VBox。为此,请创建文件“/etc/apt/sources.list.d/virtualbox.list”,其中包含以下内容:
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian eoan contrib
之后,添加 gpg 密钥,以便可以检查其来源
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
然后,您可以使用命令“sudo apt update; sudo apt install virtualbox-6.1”安装 VBox