It seems like your sources list is not configured properly: either the file you've created at /etc/apt/sources.list.d/
(usually virtualbox.list
if created when using a script or a tutorial),
or the file /etc/apt/sources.list
if you've edited it directly.
You actually have two problems here:
Wrong dist name (no error currently shown, but will pop up as soon as we fix your main problem).
May be fixed by changing the word bionic
with focal
, so your stanza would be:
deb http://download.virtualbox.org/virtualbox/debian focal contrib
Wrong architectures chosen to be looked for in the given target repository.
This involves the understanding of how repositories actually work, and causing your problem.
When installing a package using the APT util, it connects to a repository such as this one (you may actually browse them using your web browser), and searches for a Release file or a InRelease file, that describes important key information regarding the available packages in this repository.
Notice that in the given Ubuntu repo examples, those files include these architectures:
Architectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x
Ubuntu 20.04 OS is only 64bit (amd64) arch, so why is it searching for 32 bit (i386)?
By default, Ubuntu's APT will also search for i386 packages, although will not install them unless we configure it to do so by dpkg
.
Your problem occurs only because of how APT is designed to work. If your source list file is configured to connect to a repo that supports both amd64
and i386
archs, it will expect the InRelease
file to have amd64
and i386
written at the architecture stanza: Architectures: amd64 i386
.
VirtualBox's repo InRelease file only has amd64
written in it, thus APT skips this repo, even if it has a package matching your needs and OS, only because you described you need a repo that also supports i386
.
Solution:
Since we can't control what's written in VirtualBox's server files, we'll have to change something in our local system.
Edit your sources list and tell APT to search for a repo that only holds amd64
architecture packages - add [arch=amd64]
to your stanza:
deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian focal contrib