SDL2 i386 and amd64 can't coexist - any workaround?

Questions about Wine on Linux
Post Reply
Iori Branford
Newbie
Newbie
Posts: 2
Joined: Wed Oct 20, 2021 11:25 am

SDL2 i386 and amd64 can't coexist - any workaround?

Post by Iori Branford » Wed Oct 20, 2021 11:41 am

Installing winehq-stable on Ubuntu 20.04 Focal 64-bit, following the trail of unmet dependencies led me to this:

Code: Select all

$ sudo apt-get install --install-recommends libsdl2-2.0-0:i386
...
The following packages were automatically installed and are no longer required:
  [dependents of libsdl2:amd64]
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libwayland-cursor0:i386 libwayland-egl1:i386 libxkbcommon0:i386 libxss1:i386
The following packages will be REMOVED:
  [libsdl2:amd64 and dependents]
The following NEW packages will be installed:
  libsdl2-2.0-0:i386 libwayland-cursor0:i386 libwayland-egl1:i386 libxkbcommon0:i386 libxss1:i386
How are you all getting around this? Or do you just switch all your SDL2 programs to i386 versions, if they have them?

User avatar
dimesio
Moderator
Moderator
Posts: 13036
Joined: Tue Mar 25, 2008 10:30 pm

Re: SDL2 i386 and amd64 can't coexist - any workaround?

Post by dimesio » Thu Oct 21, 2021 5:58 am

The usual reason for this problem is that you are trying to install an i386 version of a package that differs from its amd64 counterpart. Apt requires that both versions be exactly the same. This can happen when a user has installed something from a PPA; it should not happen with distro packages.

Iori Branford
Newbie
Newbie
Posts: 2
Joined: Wed Oct 20, 2021 11:25 am

Re: SDL2 i386 and amd64 can't coexist - any workaround?

Post by Iori Branford » Fri Oct 22, 2021 8:12 pm

Indeed, I found that the problem came from leftover packages after upgrading from Bionic. Not only PPA packages, but some core packages from Bionic that happened to be more recent than the Focal ones, which had ~18.04.sav0 or ~18.04.sav1 appended to the versions.

For anyone else having this problem, here's what I did.

List the leftover Bionic packages:

Code: Select all

$ apt list --installed | grep ~18.04.sav > to-downgrade.txt
Edit to-downgrade.txt into a one-line list of packages.

Then list the available versions of the packages:

Code: Select all

$ apt-cache policy $(cat to-downgrade.txt) >> to-downgrade.txt
Edit to-downgrade.txt into a one-line list of packages and versions like this, where each version is the most recent distro version. If a package isn't available from the distro, leave it out.

Code: Select all

package=version package=version package=version package=version ...
Do the downgrade:

Code: Select all

$ sudo apt install $(cat to-downgrade.txt)

Post Reply