Score:2

Issues with dependencies when installing wine

ke flag

When I was trying to install wine on Ubuntu 20.04.2 LTS, I get this error:

jayden@UbuntuInstall:~$ 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 (= 6.0.1~hirsute-1)
E: Unable to correct problems, you have held broken packages.

I have tried installing this dependency to then get another error saying I need more dependencies.

jayden@UbuntuInstall:~$ sudo apt install wine-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:
 wine-stable : Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.2 is to be installed
               Depends: wine-stable-i386 (= 6.0.1~hirsute-1)
               Depends: wine-stable-amd64 (= 6.0.1~hirsute-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And when I go deeper into it I keep getting more missing dependency errors. I also don't know how to remove the broken packages as everything I have tried hasn't worked.

I don't know how to get the older version of wine that's intended for 20.04 as that may be the issue.

Does anyone know how I can resolve this.

in flag
Can I confirm the version of Ubuntu you’re using? Your question says 20.04, but the error message references Hirsute, which is 21.04
JayGoBrrrr avatar
ke flag
Nope, I'm definatly on 20.04.2
JayGoBrrrr avatar
ke flag
I've just thought of something. There may have been a chance that I accidentally installed the repository for 21.04. How would I check this?
Score:4
ma flag

In order to install Wine from WineHQ, you need to follow the instructions from https://wiki.winehq.org/Ubuntu.

You need to make sure that you add the repo for the correct system version, and that seems to be the issue in your case. Check out the files in /etc/apt/sources.list.d/, find one containing the Wine repo and replace in it all occurrences of hirsute with focal in your case for Ubuntu 20.04 (you can verify the name of the release you are using with the command lsb_release --codename).

In addition to that, ensure that you do:

sudo apt update && sudo apt upgrade

before installing any new packages, to ensure outdated packages aren't causing any issues during the installation of the new ones. For example, dependencies on the new package may reference new versions of dependencies about which apt won't know without updating, leading to the same error.

Score:2
es flag

It seems you have installed a wrong repository. first you need to delete that and then install the right one. first open your repository list in terminal:

sudo nano /etc/apt/sources.list

scroll down the page to find this lines of code or similar:

deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ focal main

in your case probably you have installed "hirsute main". in that case you need to remove two lines and save (ctrl+s) list and exit (ctrl+x). also if you have installed other versions they are will be there aswell. if so keep right lines and just delete others. if you have'nt install other version just run the right code. eg: (for focal version)

sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

update packages:

sudo apt update

then install wine:

sudo apt install --install-recommends winehq-stable
U.V. avatar
cn flag
nope this just creates the same error wine-stable-i386:i386 : Depends: libfaudio0:i386 (>= 19.06.07) not to be Installed Depends: libgphoto2-6:i386 (>= 2.5.10) Depends: libxml2:i386 (>= 2.9.0) Depends: libasound2-plugins:i386 R: libglu1-mesa:i386 or libglu1:i386 R: libosmesa6:i386 R: libsane:i386 or libsane1:i386 R: libxslt1.1:i386
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.