0

Recently I tried to install Wine, but I tried to install Jammy version by accident, and now, when I try this command

sudo apt install --install-recommends winehq-staging

I get this output

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-staging : Depends: wine-staging (= 7.6~jammy-1) E: Unable to correct problems, you have held broken packages.

How can I solve it? I don't get any errors with sudo apt update or sudo apt upgrade

sudo apt update

Ign:1 http://packages.linuxmint.com una InRelease Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://packages.linuxmint.com una Release
Hit:5 https://packages.microsoft.com/ubuntu/21.04/prod hirsute InRelease
Hit:6 http://archive.canonical.com/ubuntu focal InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease Hit:10 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu focal InRelease Hit:11 http://packages.microsoft.com/repos/code stable InRelease Hit:12 https://dl.winehq.org/wine-builds/ubuntu focal InRelease Hit:13 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease Reading package lists... Done Building dependency tree
Reading state information... Done All packages are up to date.

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

If I try to unhold all held packages I get this output

sudo apt-mark unhold $(apt-mark showhold)
E: No packages found

I've tried with these aptitude commands

sudo aptitude install winehq-staging
sudo aptitude -f install winehq-staging

but they don't seem to solve anything, the actions that aptitude do are just keep the packages at their current version.

I downloaded winehq-staging_7.6~focal-1_amd64.deb and I got this output

sudo dpkg -i --force-all winehq-staging_7.6~focal-1_amd64.deb
Selecting previously unselected package winehq-staging.
(Reading database ... 378899 files and directories currently installed.)
Preparing to unpack winehq-staging_7.6~focal-1_amd64.deb ...
Unpacking winehq-staging (7.6~focal-1) ...
dpkg: winehq-staging: dependency problems, but configuring anyway as you requested:
 winehq-staging depends on wine-staging (= 7.6~focal-1); however:
  Package wine-staging is not installed.

Setting up winehq-staging (7.6~focal-1) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24+linuxmint1) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for man-db (2.9.1-1) ...

but wine seems to still being unavailable. I tried to remove the broken package using Synaptic Package Manager, the first try it was unable to remove it, then I did it again and the broken package seems to be already removed. But I keep getting this output

sudo apt install --install-recommends winehq-staging
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5075 (synaptic)       
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-staging : Depends: wine-staging (= 7.6~jammy-1) E: Unable to correct problems, you have held broken packages.

and sudo apt update keeps showing

Hit:10 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease

I just got the git repository and build it with make and seems that that solved the problem. But I still having the https://dl.winehq.org/wine-builds/ubuntu jammy InRelease line.

Mozie
  • 1

2 Answers2

1

Try installing the .deb file for winehq-staging

https://pkgs.org/download/winehq-staging

After downloading, run this

sudo dpkg -i --force-all [package_name].deb

This works for me

Nmath
  • 12,333
  • +1 because this is a valid solution. However, OP is already having dependency issues. I'm not sure that installing the software from a .deb file is a good idea. – Nmath Apr 15 '22 at 06:39
0

add universe repository

sudo add-apt-repository universe

then update cache

sudo apt update

lastly

sudo apt install wine