can't install wine32 on Ubuntu 20.04

I have checked all other answers and tutorials on the net, but I still get the same message when I attempt to install wine32:

cybnom@cybnom1:~$ sudo apt-get install wine32
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:
 wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried going deeper on the dependency list, but all i386 libraries seem to be missing and impossible to install. aptitude was no help. i cleared my sources.list and used the official clean one, to no effect. wine64 installed perfectly, but I need the 32-bit version to run most VSTs that I use for music making.

I appreciate any help whatsoever.

UPDATE

As indicated by the comments below, here are the results when I try and follow the instructions at https://wiki.winehq.org/Ubuntu :

cybnom@cybnom1:~$ sudo dpkg --add-architecture i386 
cybnom@cybnom1:~$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
File ‘winehq.key’ already there; not retrieving.

cybnom@cybnom1:~$ sudo apt-key add winehq.key
OK
cybnom@cybnom1:~$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                 
Hit:3 http://archive.canonical.com/ubuntu focal InRelease                      
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
cybnom@cybnom1:~$ sudo apt update
Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease                         
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
cybnom@cybnom1:~$ sudo apt install --install-recommends winehq-stable
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:
 winehq-stable : Depends: wine-stable (= 5.0.2~focal)
E: Unable to correct problems, you have held broken packages.

UPDATE 2

Unable to correct problems, you have held broken packages has been recommended to me, but there dpkg --get-selections | grep hold returns nothing and there are no broken packages in synaptic:

enter image description here

UPDATE 3

I've tried going down the dependency tree and asking explicitly that the i386 packages were installed. This happened when I tried to install libpcre-2-8-0:

cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install libpcre2-8-0:i386
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:
 dictionaries-common : Depends: debconf (>= 1.5.5) but it is not going to be installed or
                                debconf-2.0
                       Depends: libtext-iconv-perl but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

but both debconf and dictionaries-common are installed in their latest versions:

cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install debconf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
debconf is already the newest version (1.5.73).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install dictionaries-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dictionaries-common is already the newest version (1.28.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and they aren't even listed as dependencies of libpcre2-8-0 here. i tried reinstalling debconf, no luck. I have cleaned all my repo sources, so it now looks like the official focal list, plus vscode and chrome. I confirmed that I can install other i386 libraries, so it's something specific to the wine32 dependencies. Another oddity is that when I use synaptic to ask wine32 to be installed, it marks git for removal (???).

By this point, I'm seriously considering trying to reinstall 20.04 LTS, but I'm postponing because I really don't have the space to backup all my files at the moment, and this is my work computer, which I can't afford to go for much more than a day without it functioning properly.

Is there any workaround for it? I don't really use wine for anything but VSTs in LMMS, but they are quite essential for me. Again, any help whatsoever is appreciated.


Solution 1:

So, I cracked the code over here, hope this helps somebody else:

Turns out the whole problem was that some dependencies were i386 of a different number than the installed amd64 equivalents. In my case, it was libpcre2-8-0 (which had an amd64 10.35 version installed) and libgd3. I simply downgraded them to the same available i386 version number (I checked those with apt-cache policy) and voilà, wine32 installed, no problems.

Solution 2:

I had similar problems with wine32 on ubuntu 20.04. In my case, the problem was caused by the updates that were published and then removed by ubuntu team, check this bug — https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1926918 . Since by default apt doesn't want to downgrade packages, it refuses to install wine32 (which depends on older packages)

So, all I have to do was to downgrade all packages that used version 2.31-0ubuntu9.3:

$ dpkg -l | grep 2.31-0ubuntu9.3 
ii  libc-bin                              2.31-0ubuntu9.3                        amd64        GNU C Library: Binaries
ii  libc6:amd64                           2.31-0ubuntu9.3                        amd64        GNU C Library: Shared libraries
ii  libc6:i386                            2.31-0ubuntu9.3                        i386         GNU C Library: Shared libraries
ii  libc6-dbg:amd64                       2.31-0ubuntu9.3                        amd64        GNU C Library: detached debugging symbols
ii  locales                               2.31-0ubuntu9.3                        all          GNU C Library: National Language (locale) data [support]

$ apt install libc-bin=2.31-0ubuntu9.2 libc6:amd64=2.31-0ubuntu9.2 libc6:i386=2.31-0ubuntu9.2 libc6-dbg:amd64=2.31-0ubuntu9.2 locales=2.31-0ubuntu9.2

This problem with dependencies will probably go away with the new update (when the ubuntu team will release version 2.31-0ubuntu9.4 or higher)