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...

  • Did you try this https://askubuntu.com/questions/316025/how-to-install-and-configure-wine/316029#316029 – Adupa Vasista Sep 14 '20 at 05:51
  • Yes,I tried https://askubuntu.com/questions/316025/how-to-install-and-configure-wine/316029#316029, it has the same base instructions of the link I provided https://wiki.winehq.org/Ubuntu, on both I cant get past this command sudo apt install --install-recommends winehq-stable with the problems I specify on my question. Based on the FAQ https://wiki.winehq.org/FAQ#How_do_I_solve_dependency_errors_when_trying_to_install_Wine.3F, I have no other PPA repository that could be causing these problems,so they are a conflict with vanilla ubuntu 20.04. I think this is not a dup cuz of these problems. – Aquarius Power Sep 14 '20 at 21:47
  • Please comment if you tried installing wine with 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 like in this answer. – karel Sep 15 '20 at 06:35
  • @karel it failed, I will update the question with the results – Aquarius Power Sep 15 '20 at 21:45
  • @Melebius I will update the question with the results of many commands. – Aquarius Power Sep 15 '20 at 21:49
  • 1
    There are no bad PPAs and your error message is you have held broken packages. Based on this information I would try Unable to correct problems, you have held broken packages. That question has 12 answers and unfortunately you might have to grind through all of them. – karel Sep 15 '20 at 23:54
  • @karel fortunately I can go thru them thx! :), I ignored it because on Synaptic I click to fix broken packages and it says they were fixed... – Aquarius Power Sep 16 '20 at 02:56
  • @karel I am trying now with aptitude, but seems a slow process if I am going to do it carefully, will take some time... – Aquarius Power Sep 16 '20 at 03:30
  • If you run into any problems please comment and I will open up a private chatroom for this question so that we can get this problem sorted out. – karel Sep 16 '20 at 04:54
  • @karel I tried aptitude, it scares me... I comented on it in the post. Now I am thinking on using chroot to not mess my OS. Btw, none of the solutions at https://askubuntu.com/q/223237/ fixed the broken packages thing that is only shown if I try to install i386 packages (other packages it wont show up). My guess is 20.04 64bits is incompatible with i386 stuff at the same time, it always show a lot of conflicts, why are these i386 packages even available if we cant install them w/o messing things up? – Aquarius Power Sep 17 '20 at 02:34
  • As far as I know there's usually no reason to install i386 packages in 20.04. You don't need the i386 packages and besides that they break other packages on your system. Wine provides its own 32-bit package, so it's OK to install that package. This would be a good time to use the --simulate option (without sudo) of apt or apt-get to test the simulated results of removing all i386 packages. – karel Sep 17 '20 at 02:41
  • I will remove all i386 stuff for sure! I am checking some ways to prepare a chroot i386 environment just to install wine32 stuff and with all deps w/o messing my OS. I am trying to merge https://wiki.winehq.org/Building_Wine#Chroot with https://stackoverflow.com/questions/57663361/bus-error-when-attempting-to-run-wine-under-a-x86-chroot-environment-on-raspberr to have an environment only to run win32 apps, so I will try debootstrap --variant=minbase, but I think someone may have done that already, so better I research more... If it works, I will answer here with the results. – Aquarius Power Sep 17 '20 at 02:55
  • I tried wine some years ago and felt it was haft-baked solution. If the hardware resource permits, it’s better to spin up a Windows instance in Virtualbox or the like would be smoother. – biocyberman Dec 02 '20 at 22:24
  • @biocyberman I would suggest W7 + VMWarePlayer, but Wine improved a lot, the stable packages are really good. Of course it wont run everything, but it have been able to run everything I want for now :). Next try will be PUBGLitePC on a ubuntu32bit chroot xD. – Aquarius Power Dec 02 '20 at 23:02

1 Answers1

1

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.