1

I carefully tried all steps here: https://wiki.winehq.org/Ubuntu
(it's core is equivalent to what is here: How to install and configure Wine?)

but when trying to install the dependencies, I end up with errors like:
Note, selecting 'libasound2-data' instead of 'libasound2-data:i386'

Basically it is saying it wont install the i386 no matter what I try...

If there is no error with some package, it asks me to uninstall a huge lot of packages I don't want to...

about the FAQ https://wiki.winehq.org/FAQ#How_do_I_solve_dependency_errors_when_trying_to_install_Wine.3F
the only extra repository I have enabled is: https://dl.winehq.org/wine-builds/ubuntu/ This means, there is no other PPAs that could cause a conflict and I am having problems with vanilla ubuntu 20.04...

I cant get past this command:
sudo apt install --install-recommends winehq-stable
even trying to use the FAQ and other tips...

Can someone at least say, before this question gets closed (despite I disagree), if you managed to install Wine on ubuntu 20.04 with i386 (win32) support?


trying this command: sudo add-apt-repository --remove 'deb https://dl.winehq.org/wine-builds /ubuntu/ focal main' && sudo apt update && sudo apt install -y wine32 wine64 wine-stable
fails with:

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. wine-stable : Depends: wine-stable-i386 (= 5.0.2~focal) 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.


WHY IT WONT INSTALL THE DEPENDENCIES? it says "but it is not going to be installed" :( ...
when trying these:

$sudo apt install --install-recommends winehq-stable #requires wine-stable
$sudo apt install --install-recommends wine-stable #requires wine-stable-i386
$sudo apt install --install-recommends wine-stable-i386 #quite a mess...
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. wine-stable-i386:i386 : Depends: libasound2:i386 (>= 1.0.16) but it is not going to be installed Depends: libfaudio0:i386 (>= 19.06.07) but it is not going to be installed Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed Depends: libgphoto2-6:i386 (>= 2.5.10) but it is not going to be installed Depends: libgphoto2-port12:i386 (>= 2.5.10) but it is not going to be installed Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed Depends: libgstreamer1.0-0:i386 (>= 1.4.0) but it is not going to be installed Depends: libldap-2.4-2:i386 (>= 2.4.7) but it is not going to be installed Depends: libopenal1:i386 (>= 1.14) but it is not going to be installed Depends: libpulse0:i386 (>= 0.99.1) but it is not going to be installed Depends: libudev1:i386 (>= 183) but it is not going to be installed Depends: libxml2:i386 (>= 2.9.0) but it is not going to be installed Depends: libasound2-plugins:i386 but it is not going to be installed Recommends: libcups2:i386 but it is not going to be installed Recommends: libdbus-1-3:i386 but it is not going to be installed Recommends: libglu1-mesa:i386 but it is not going to be installed or libglu1:i386 Recommends: libosmesa6:i386 but it is not going to be installed Recommends: libsane:i386 but it is not going to be installed or libsane1:i386 Recommends: libsdl2-2.0-0:i386 but it is not going to be installed Recommends: libtiff5:i386 but it is not going to be installed Recommends: libxslt1.1:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.

and finally if I try to install these i386 stuff it asks to remove like 1.5GB of packages, like it want to convert my system to a 32 bits thing, and not compatible with 32bits...


trying with aptitude

$sudo aptitude install wine-stable-i386

I see these as a problem

  Remove the following packages:                                                 
  1.  mesa-vdpau-drivers [20.0.8-0ubuntu1~20.04.1 (now)]                           
    
  2.  vdpau-driver-all [1.3-1ubuntu2 (focal, now)] 
    
    

    Leave the following dependencies unresolved:

  3. libgstreamer-plugins-base1.0-0:i386 recommends gstreamer1.0-plugins-base:i386
    
  4. libvulkan1:i386 recommends mesa-vulkan-drivers:i386 | vulkan-icd:i386        
    
  5. libopenal1:i386 recommends libasound2:i386 (>= 1.0.16)                       
    
  6. wine-stable-i386:i386 recommends libcups2:i386                               
    
  7. wine-stable-i386:i386 recommends libdbus-1-3:i386                            
    
  8. wine-stable-i386:i386 recommends libglu1-mesa:i386 | libglu1:i386            
    
  9. wine-stable-i386:i386 recommends libosmesa6:i386                             
    
  10. wine-stable-i386:i386 recommends libsane:i386 | libsane1:i386                
    
  11. wine-stable-i386:i386 recommends libsdl2-2.0-0:i386                          
    
  12. wine-stable-i386:i386 recommends libtiff5:i386                               
    
  13. wine-stable-i386:i386 recommends libxslt1.1:i386 
    

if I try to choose them, aptitude will never end trying to calculate stuff, with a lot of "package x breaks package y" and a huge lot of conflicts:

$sudo aptitude install wine-stable-i386 gstreamer1.0-plugins-base:i386 mesa-vulkan-drivers:i386 libasound2:i386  libcups2:i386 libdbus-1-3:i386 libglu1-mesa:i386 libosmesa6:i386 libsane:i386 libsdl2-2.0-0:i386 libtiff5:i386 libxslt1.1:i386

Actually, aptitude is just scaring me... I dont want to mess my system just to run win32 stuff.

I am checking what chroot can do now, I dont want to mess my OS...

1 Answers1

2

These instructions are for 20.04 ubuntu focal, but may work with other releases.
Based on https://wiki.winehq.org/Building_Wine#Chroot

$ sudo apt-get install schroot debootstrap

create this file with ex.: sudo geany /etc/schroot/chroot.d/ubuntu_i386.conf AND set your user name properly on it!

$ cat /etc/schroot/chroot.d/ubuntu_i386.conf
[ubuntu_i386]
description=Ubuntu Release 32-Bit
personality=linux32
directory=/srv/chroot/ubuntu_i386
root-users=YOURUSERNAME
type=directory
users=YOURUSERNAME
$ sudo mkdir -p /srv/chroot/ubuntu_i386

where is focal use your release name!!!

$ sudo debootstrap --variant=minbase --arch=i386 focal /srv/chroot/ubuntu_i386 http://archive.ubuntu.com/ubuntu/ 
$ sudo cp /etc/apt/sources.list /srv/chroot/ubuntu_i386/etc/apt/

this will generate a command line to use later!

$ echo apt install `apt-cache depends ubuntu-minimal |egrep -v ":i386|ubuntu-minimal" |sed -e 's"Depends:""' -e 's"Recommends:""' |tr -d '\n'` 
apt install ... # copy it

go to CHROOT

$ schroot -c ubuntu_i386 -u root
$ apt-get update
$ apt-get install ubuntu-minimal # this may fail

if apt-get install ubuntu-minimal fails, use the copied apt install ... from above. I had to remove some packages tho and it ended up like this on focal: apt install adduser apt apt-utils bzip2 debconf debconf-i18n e2fsprogs init iproute2 kmod less locales lsb-release mawk mount netbase netcat-openbsd passwd procps python3 sensible-utils sudo tzdata ubuntu-keyring udev vim-tiny whiptail

$ apt-get install wine # put a happy smile here! :)
$ exit

on HOST now (based on https://unix.stackexchange.com/a/47579/30352):
lets grant it can run X apps in the host
copy the below line, note that the 1st parameter "YourPCName/unix:" may not have the display number!!!

$ xauth list 
YourPCName/unix:  MIT-MAGIC-COOKIE-1  39825672cb45c29b7c49b7 

if needed, take note of the display number you will need it below

$ declare -p DISPLAY
declare -x DISPLAY=":1"

get back to chroot as normal user

$ schroot -c ubuntu_i386 

inside CHROOT
it needs the display number after ':'

$ xauth add "YourPCName/unix:1" "MIT-MAGIC-COOKIE-1" "39825672cb45c29b7c49b7"
$ xauth list #confirm it worked
YourPCName/unix:1  MIT-MAGIC-COOKIE-1  39825672cb45c29b7c49b7 

QOL, use the display number here too

$ export DISPLAY=:1 
$ xterm # test it!
$ wine explorer # test with a smile! :)

To mount --bind directories inside schroot, use these instructions: https://unix.stackexchange.com/a/609808/30352
Basically, you will need to mount --bind at /run/schroot/mount/ubuntu_i386-... and NOT at /srv/chroot/ubuntu_i386 !!!

Winetricks will require cabextract.
Download and install these 2 with dpkg -i ...:
https://launchpad.net/ubuntu/bionic/i386/libmspack0/0.6-3ubuntu0.3
https://launchpad.net/ubuntu/bionic/i386/cabextract/1.6-1.1
(yes, the bionic package works on focal)

It ends up with about 1.2GB btw.