1

I have this error message while running sudo apt update.

"Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'"

Running the same command few days ago didnt show the error messages. I have followed soem suggested i found online (Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository ... doesn't support architecture 'i386') and (Unsupported architecture 'i386' when running `apt update` on Virtualbox bionic repo). But it still returns same error.

Could it be because mine is Ubuntu 20.04, a problem with my configuration or any new installation i did? I dont know how to resolve it please.

Idongesit
  • 15
  • 1
  • 3

1 Answers1

1

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
Pizza
  • 1,428
  • Thank you, that is a good and above all comprehensible explanation. I was able to solve my problem this way! – schube Feb 13 '24 at 08:18