Score:1

Still can't install Wine in Ubuntu 20.04

es flag

I know this question has at least half a dozen with a similar title, but none of those answers or comments help me. So here we go:

I tried to follow the instructions on the Wine Wiki. When I did

sudo dpkg --add-architecture i386

the command returned to the prompt with no error, so I assumed the architecture was added successfully. I added the repository as instructed, and then I did:

sudo apt update.

Of course the screen rolled so fast that I didn't look if any mention of i386 was being made. I tried to sudo apt install -install-recommends winehq-stable and I got the dreaded message that a dependency was not being installed. I tried to sudo apt install that one, which gave me yet another unmet dependency. I tried to follow the unmet dependencies until I got such a long list that I got tired of typing them all by hand (bonus question: is there a way to do that automatically? Like sending that output to a file and copying and pasting it back to the console?). So I checked the architecture with sudo dpkg --print-architecture* and big surprise: it returned only amd64, no i386.

At this point I purged the wine-ppa and tried to install wine from the regular ubuntu repositories, thinking I would live with the fact that it may not be the latest. Only it didn't install that either: it gave me the message

wine : Depends: wine64 (>= 5.0-3ubuntu1) but it is not going to be installed or
                 wine32 (>= 5.0-3ubuntu1)
        Depends: wine64 (< 5.0-3ubuntu1.1~) but it is not going to be installed or
                 wine32 (< 5.0-3ubuntu1.1~)

I thought it funny that the message seems to suggest that wine depends on both an older and a newer version of the same packages. I thought something could have been left from the ppa I added previously and so I followed these instructions to even delete the lock files of apt. No change: the message is still there. I got to the point where I don't know how to proceed.

Edit:

I also looked at the dpkg log before and after trying sudo dpkg --add-architecture i386 and there's no change. The try didn't get logged (don't know if it should).

*Yet, if I type sudo dpkg --print-foreign-architectures it does show i386 (only).

galexite avatar
pk flag
Did you supply `--install-recommends` when you installed `winehq-stable`, as in `sudo apt install --install-recommends winehq-stable`?
kanehekili avatar
zw flag
Why compromising a secure system with Wine? Sandbox a Windows in a VM, but don't make your Linux vulnerable
Andyc avatar
es flag
@galexite Yes, I did. I updated the question.
Andyc avatar
es flag
@kanehekili How is Linux with Wine vulnerable?
kanehekili avatar
zw flag
[this forum has most of the answers](https://askubuntu.com/questions/49255/risks-disadvantages-associated-with-wine)
N0rbert avatar
zw flag
Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories) as I can't reproduce on fresh 20.04 LTS with only WineHQ extra repos added.
Andyc avatar
es flag
@N0rbert Before I try that, a question. If I disable all the repositories I have manually added, that are not so many, but some like apache2, mariadb, php and such, will it try to pull the "regular" software from official ubuntu, effectively downgrading my versions? You might tell me to just try and see, but I'm kind of afraid to. Also, that wouldn't explain why I can't enable the i386 architecture. I edited the question to add one more little thing I tried.
N0rbert avatar
zw flag
You have to check that all official repositories are correct. I'm not suggesting disabling all other 3rd-party repositories.
Andyc avatar
es flag
@N0rbert OK, then yes, I did try that, but it didn't help.
user.dz avatar
ng flag
@Andyc Could you install `apt-rdepends` then upload output of these commands to https://paste.ubuntu.com 1) `apt-get -s -o Debug::pkgProblemResolver=yes install wine` 2) `echo q | aptitude -s install wine` 3) `apt-cache policy $(apt-rdepends wine 2>/dev/null | grep "^[a-zA-Z]" | sort | paste -s -d" ")`
Andyc avatar
es flag
@user.dz I could do that, but I don't currently have aptitude installed. I normally use apt. Should I go ahead and install it?
user.dz avatar
ng flag
@Andyc I would recommend it, because it has more clear error messages compared to `apt`
Andyc avatar
es flag
@user.dz Sorry it took so long, it's pasted now. Thank you very much for your interest in the matter.
user.dz avatar
ng flag
@Andyc also myself I am trapped in a region with limited cell and internet coverage for work.
user.dz avatar
ng flag
@Andyc I don't see any link in comment or original post! you need share the link you get from paste.ubuntu.com? if lost, you may just rerun those commands and paste them again.
Andyc avatar
es flag
@user.dz I didn't know that. Here is the link: https://paste.ubuntu.com/p/4FpbjMqsRX/
user.dz avatar
ng flag
@Andyc The Ubuntu update repository is disabled while many package were installed from there. You need to re-enable it from "software properties" tool, update lists then try installing wine again, if not successful, upload new output of same commands. The issue here is in multi-arch systems application need same version of a package from both architectures i386/amd64 (32bit/64bit). As update repository is disabled you have some packages install with high version from update repository while their other architecture which not installed yet is at lower version from main repository.
Andyc avatar
es flag
@user.dz Thank you for your reply. Which Ubuntu update repository is disabled? The only one I see disabled in "Software and Updates" (if that's what you mean by "software properties") is the Canonical 'partner' repository. I also don't see anything specifically commented out in `sources.list` other than 'partners'. Could you guide me to doing what you mean? Also, can that have anything to do with not being (apparently) able to enable the i386 architecture?
user.dz avatar
ng flag
@Andyc take for example `libc6` from the output shared previously https://paste.ubuntu.com/p/9TghTXxfpW/ . you have version `2.31-0ubuntu9.2` installed but no active repository for that version , well from Ubuntu packages search page https://packages.ubuntu.com/search?searchon=names&keywords=libc6 it is located in focal-update (main) channel. I think you have update active but not for all channels (main, universe, multiverse...). Would you share your current `sources.list` (may be it was edited manually, and software properties could guess it wrong)
Andyc avatar
es flag
@user.dz Here is the `source.list` file: https://paste.ubuntu.com/p/MnQVhgyVDh/ I can't see anything missing, but your trained eye may catch the problem.
user.dz avatar
ng flag
@Andyc yes it is good, could verify architecture setup: `dpkg --print-architecture; dpkg --print-foreign-architectures`
Andyc avatar
es flag
@user.dz `dpkg --print-architecture` gives `amd64`, `dpkg --print-foreign-architectures` gives `i386`.
user.dz avatar
ng flag
@Andyc they are good too, have you run `sudo apt update` Lately or after changing settings?
Andyc avatar
es flag
@user.dz I run that almost every day together with `sudo apt upgrade`
user.dz avatar
ng flag
@Andyc, Honestly info we check does not agree with the initial debugging output here: https://paste.ubuntu.com/p/4FpbjMqsRX/
user.dz avatar
ng flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/129952/discussion-between-user-dz-and-andyc).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.