Ubuntu 18.04 安装virtualbox失败

Ubuntu 18.04 安装virtualbox失败

如果这是重复的,请原谅,我看到其他线程也有类似的错误,但没有一个答案可以解决我的问题。

我正在尝试安装 virtualbox,首先尝试的是此处的“Ubuntu 18.04 / 18.10 / Debian 10”的下载链接https://www.virtualbox.org/wiki/Linux_Downloads但是当我双击它并单击安装时,什么也没有发生。

因此我尝试通过命令行安装它:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -`
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

两个命令都输出OK

sudo apt-get update

输出

Atteint:1 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Atteint:2 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                                                                            
Atteint:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease                                                                                                                                   
Réception de:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]                                                                                                                              
Atteint:5 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                                                                          
Atteint:6 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu bionic InRelease                                                                                                                    
Ign:7 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                  
Atteint:8 https://dl.google.com/linux/chrome/deb stable Release                                                                                                                   
Atteint:9 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease                               
Réception de:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [204 B]
Réception de:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2 464 B]                   
Atteint:13 http://download.virtualbox.org/virtualbox/debian cosmic InRelease                                
91,4 ko réceptionnés en 1s (110 ko/s)                          
Lecture des listes de paquets... Fait
N:The file configured "non-free/binary-i386/Packages" will not be taken into account because the repository "http://download.virtualbox.org/virtualbox/debian cosmic InRelease" does not support the "i386" architecture
N:The file configured "non-free/binary-i386/Packages" will not be taken into account because the repository "http://download.virtualbox.org/virtualbox/debian cosmic InRelease" does not support the "i386" architecture

因此,最后两行似乎表明该命令正在尝试更新 32 位,但我的系统和操作系统是 64 位: CPU信息

最后 sudo apt-get install virtualbox-6.0

输出

Reading package lists ... Done
Building the dependency tree
Reading status information ... Done
Some packages can not be installed. This can mean
that you asked for the impossible, or, if you use
the unstable distribution, that some packages have not yet
were created or did not come out of Incoming.
The following information should help you resolve the situation:

The following packages contain unmet dependencies:
 virtualbox-6.0: Depends: libqt5x11extras5 (> = 5.6.0) but it is not installable
E: Unable to fix problems, faulty packages are in "keep as is" mode.

我完全删除了 virtualbox 并再次尝试,但没有成功。(使用答案问题)然而当我这样做sudo ps aux | grep -i "vbox"

我有 louis 25612 0.0 0.0 15664 1060 pts/0 S+ 13:23 0:00 grep --color=auto -i vbox

即使做 sudo pkill VBox*sudo pkill vbox*

所以我不知道如何解决我的问题并正确安装 virtualbox

答案1

terminal...

cd /etc/apt# 更改目录

grep -i virtualbox sources.list# 搜索 virtualbox

如果发现...

  • sudo -H gedit sources.list# 编辑文件

  • virtualbox找到包含...的行

  • 更改debdeb [arch=amd64]并保存文件。

如果未找到...

  • cd sources.list.d# 切换到子目录

  • grep -i virtualbox *.list# 查找包含 virtualbox 的文件

  • 编辑已识别的文件并按如上所示进行编辑。

答案2

经过一番寻找,我发现https://www.virtualbox.org/ticket/17970所以我这么做 sudo add-apt-repository universesudo apt get update

我成功安装了 VirtualBox。但是,在安装时sudo apt get update我仍然看到两个通知

N:The file configured "non-free/binary-i386/Packages" will not be taken into account because the repository "http://download.virtualbox.org/virtualbox/debian cosmic InRelease" does not support the "i386" architecture
N:The file configured "non-free/binary-i386/Packages" will not be taken into account because the repository "http://download.virtualbox.org/virtualbox/debian cosmic InRelease" does not support the "i386" architecture

所以如果有人找到办法解决这些通知,我会接受答案

相关内容