Score:2

Cannot Install Wine Using Apt, As I Am Holding Broken Packages

jp flag

I recently decided to install Wine on my computer so I could run some Windows programs on Kubuntu 21.04. However, whenever I install package winehq-devel, I get the output below:

darkbrave_@darkbrave-kubuntu:~$ sudo apt install winehq-devel
Reading package lists... Done
Building dependency tree... Done
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-devel : Depends: wine-devel (= 6.15~hirsute-1)
E: Unable to correct problems, you have held broken packages.
darkbrave_@darkbrave-kubuntu:~$ 

If I try to install wine-devel, I get this:

darkbrave_@darkbrave-kubuntu:~$ sudo apt install wine-devel
Reading package lists... Done
Building dependency tree... Done
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:
 libsdl2-2.0-0 : Depends: libgbm1 (>= 17.1.0~rc2) but it is not installable
E: Unable to correct problems, you have held broken packages.
darkbrave_@darkbrave-kubuntu:~$ 

I followed the instructions on the official Wine wiki, but get these errors. Even if I try to install the packages it can't install, those packages install fine, but if I run the wine install command again, I still get these errors.

Output of cat /etc/apt/sources.list:

darkbrave_@darkbrave-kubuntu:~$ cat /etc/apt/sources.list
# deb cdrom:[Kubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420)]/ hirsute main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ hirsute universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute universe
deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu hirsute partner
# deb-src http://archive.canonical.com/ubuntu hirsute partner

deb http://security.ubuntu.com/ubuntu hirsute-security main restricted
# deb-src http://security.ubuntu.com/ubuntu hirsute-security main restricted
deb http://security.ubuntu.com/ubuntu hirsute-security universe
# deb-src http://security.ubuntu.com/ubuntu hirsute-security universe
deb http://security.ubuntu.com/ubuntu hirsute-security multiverse
# deb-src http://security.ubuntu.com/ubuntu hirsute-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
darkbrave_@darkbrave-kubuntu:~$ 

Contents of /etc/apt/sources.list.d/:

darkbrave_@darkbrave-kubuntu:/etc/apt/sources.list.d$ ls
adoptopenjdk.list
archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-hirsute.list
teams.list
darkbrave_@darkbrave-kubuntu:/etc/apt/sources.list.d$ 

Contents of /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-hirsute.list:

darkbrave_@darkbrave-kubuntu:/etc/apt/sources.list.d$ cat archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-hirsute.list 
deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ hirsute main
darkbrave_@darkbrave-kubuntu:/etc/apt/sources.list.d$ 
ru flag
You're missing something that the repo is looing for, please amend your question with the contents of `/etc/apt/sources.list` and any relevant info in `/etc/apt/sources.list.d`
DarkBrave_ avatar
jp flag
@JorgeCastro I added the sources.list contents, but I'm not sure what you mean by "relevant info."
user535733 avatar
cn flag
"Broken" packages are not corrupt or missing files or broken-like-a-bicycle. Apt uses "broken" to to mean *logically inconsistent*: Package A depends upon version 1.2 instead of version 1.1. The usual way this happens is that you install wrong-version packages from a non-Ubuntu source. The usual fix is to uninstall those packages, delete that source, and then install compatible versions from the Ubuntu repositories.
DarkBrave_ avatar
jp flag
@JorgeCastro @ user535733 Okay, I added the contents of some of the files in that directory. Also how do I "fix" this? I don't want to have to use the older versions from the Ubuntu Repository, as I need the newer features.
DarkBrave_ avatar
jp flag
I think removing the repository with `sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu/ <CODENAME> main'` and then re-adding the repository fixed it.
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.