Broken Packages Fix Problem (For Wine)

I was trying to install Heroes of Might and Magic 3 with Play on Linux. When I start the program it gives me an error message

PlayOnLinux cannot find wine (from Wine). You should install it to use PlayOnLinux.

sudo apt-get install wine

I tried this but I got an error message:

E: Unable to correct problems, you have held broken packages.

What should I do?


Input:

sudo apt-get install wine

Output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine is a virtual package provided by: winehq-staging 4.0~rc1~cosmic winehq-stable 3.0.4~cosmic winehq-devel 4.0~rc1~cosmic wine-development 3.6-1
You should explicitly select one to install.
E: Package 'wine' has no installation candidate

And when I type:

sudo apt-get install winehq-stable

I get this:

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 (= 3.0.4~cosmic)
E: Unable to correct problems, you have held broken packages.

Here is my system:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required: linux-headers-4.15.0-38 linux-headers-4.15.0-38-generic linux-image-4.15.0-38-generic linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt remove wine winehq-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
Virtual packages like 'wine' can't be removed
Package 'winehq-stable' is not installed, so not removed
The following packages were automatically installed and are no longer required: linux-headers-4.15.0-38 linux-headers-4.15.0-38-generic linux-image-4.15.0-38-generic linux-modules-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove

Reading package lists... Done Building dependency tree Reading

state information... Done The following packages will be REMOVED:

linux-headers-4.15.0-38 linux-headers-4.15.0-38-generic

linux-image-4.15.0-38-generic linux-modules-4.15.0-38-generic

linux-modules-extra-4.15.0-38-generic 0 upgraded, 0 newly installed, 5

to remove and 0 not upgraded. After this operation, 336 MB disk space

will be freed. Do you want to continue? [Y/n] (Reading database ...

268454 files and directories currently installed.) Removing

linux-headers-4.15.0-38-generic (4.15.0-38.41) ... Removing

linux-headers-4.15.0-38 (4.15.0-38.41) ... Removing

linux-modules-extra-4.15.0-38-generic (4.15.0-38.41) ... Removing

linux-image-4.15.0-38-generic (4.15.0-38.41) ...

/etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting

/boot/initrd.img-4.15.0-38-generic

/etc/kernel/postrm.d/zz-update-grub: Generating grub configuration

file ... Found linux image: /boot/vmlinuz-4.15.0-42-generic Found

initrd image: /boot/initrd.img-4.15.0-42-generic Found linux image:

/boot/vmlinuz-4.15.0-39-generic Found initrd image:

/boot/initrd.img-4.15.0-39-generic Adding boot menu entry for EFI

firmware configuration done Removing linux-modules-4.15.0-38-generic

(4.15.0-38.41) ...

sudo apt-add-repository --remove 'deb bionic main'

Has no output.

sudo apt update

Get:1 bionic-security InRelease [83.2 kB] Ign:2

./ InRelease Get:3

bionic-security/main amd64 DEP-11 Metadata [204 B] Hit:4

/Ubuntu_18.10_standard

./ Release Get:6

bionic-security/universe amd64 DEP-11 Metadata [14.5 kB] Get:7

bionic-security/universe DEP-11

48x48 Icons [9,088 B] Get:8

bionic-security/universe DEP-11 64x64 Icons [36.7 kB] Get:9

bionic-security/universe DEP-11

128x128 Icons [65.9 kB] Hit:10

bionic InRelease Get:11

bionic-updates InRelease [88.7 kB]

Get:12 bionic-backports InRelease

[74.6 kB] Get:13

bionic-updates/main i386 Packages [402 kB] Get:14

bionic-updates/main amd64 Packages

[459 kB] Hit:15 xenial InRelease

Ign:16

bionic InRelease Get:17

bionic-updates/main amd64 DEP-11 Metadata [245 kB] Hit:18

bionic InRelease

Hit:19 bionic

InRelease Hit:20

bionic InRelease Get:21

bionic-updates/main DEP-11 48x48 Icons [55.7 kB] Hit:22

bionic InRelease

Get:23 bionic-updates/main DEP-11

64x64 Icons [105 kB] Ign:24

bionic InRelease Hit:25

bionic InRelease

Get:26 bionic-updates/main DEP-11

128x128 Icons [266 kB] Err:27

bionic

Release 404 Not Found [IP: 91.189.95.83 80] Err:28

bionic Release

404 Not Found [IP: 91.189.95.83 80] Get:29

bionic-updates/universe amd64

Packages [594 kB] Get:30

bionic-updates/universe i386 Packages [588 kB] Get:31

bionic-updates/universe amd64

DEP-11 Metadata [199 kB] Get:32

bionic-updates/universe DEP-11 48x48 Icons [186 kB] Get:33

bionic-updates/universe DEP-11

64x64 Icons [333 kB] Get:34

bionic-updates/universe DEP-11 128x128 Icons [767 kB] Get:35

bionic-updates/multiverse amd64

DEP-11 Metadata [2,464 B] Get:36

bionic-backports/universe amd64 DEP-11 Metadata [5,812 B] Reading

package lists... Done

E: The repository

' bionic

Release' does not have a Release file. N: Updating from such a

repository can't be done securely, and is therefore disabled by

default. N: See apt-secure(8) manpage for repository creation and user

configuration details. E: The repository

' bionic Release' does not

have a Release file. N: Updating from such a repository can't be done

securely, and is therefore disabled by default. N: See apt-secure(8)

manpage for repository creation and user configuration details.

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.

sudo apt-get install 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 (= 3.0.4~cosmic) E: Unable to correct problems,

you have held broken packages.

Edit:

 sudo apt-add-repository 

Hit:1 xenial InRelease Ign:2 bionic InRelease Hit:3 bionic InRelease
Hit:4 bionic-security InRelease
Hit:5 bionic-updates InRelease
Hit:6 bionic InRelease Hit:7 bionic-backports InRelease
Hit:8 bionic InRelease Hit:9 bionic InRelease Hit:10 bionic InRelease Hit:11 bionic InRelease Ign:12 bionic InRelease Hit:13 bionic InRelease Err:14 bionic Release 404 Not Found [IP: 91.189.95.83 80] Err:15 bionic Release 404 Not Found [IP: 91.189.95.83 80] Reading package lists... Done E: The repository ' bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository ' bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

12

5 Answers

The problem is that Wine now depends on libfaudio0, but Ubuntu versions prior to 19.10 don't include it in the standard repositories.

The link to the Winehq forum page with directions on how to install the packages is: .

For Ubuntu 18.04 do:

wget
wget
sudo dpkg -i libfaudio0_19.07-0~bionic_amd64.deb libfaudio0_19.07-0~bionic_i386.deb

Then you should be able to update and upgrade as you would normally.

7

late answer

I had a similar problem: What I did:

I remove all "wine" ppa using "Software and updates" tool in ubuntu / kubuntu. Then, i followed the guide here: install latest wine or here.

In my case, i added

sudo apt-add-repository 'deb xenial main'

and no other repository. Then...

sudo apt update && sudo apt install --install-recommends winehq-stable

Sincerely, Elias Tsolis

2

Do 1:

 sudo apt-add-repository --remove 'deb ./'

Do 2:

 wget -nc sudo apt-key add Release.key sudo apt-add-repository 

3:sudo apt-get update

4:Then install your preferred wine

sudo apt-get install --install-recommends winehq-stable
sudo apt-get install --install-recommends winehq-devel
sudo apt-get install --install-recommends winehq-staging

Hope it works!

13

Maybe try adding an SDL2 backport. This is especially useful to users that need to fill in dependencies that repeatedly nag you when you try to add them in. I recently found this online. The command is then followed by the package list update and then your desired choice of Wine. I tested this on Ubuntu 18.04. Specifically, Zorin OS 15. Upvote if this resolved your problem. :)

sudo apt-add-repository ppa:cybermax-dexter/sdl2-backport

sudo apt-get update

sudo apt-get --install-recommends winehq-stable

sudo apt-get --install-recommends winehq-devel

sudo apt-get --install-recommends winehq-staging

2

From the error you're getting, looks like you have configured the whinehq repository.

As the very same error is telling you, you have to choose which branch of wine you'd like to install, as wine is just a virtual package and it has no installation candidates so apt cannot choose by itself what to install.

As indicated here, you can install a stable version (winehq-stable), a development version (winehq-devel) or a staging version (winehq-staging).

While I'm pretty happy on my systems with winehq-staging, I suggest you install the winehq-stable branch that (as the name implies) should be the "most stable" branch of wine.

As suggested on the official WineHQ documentation, make sure to install it with the flag --install-recommends

sudo apt-get install --install-recommends winehq-stable
4

You Might Also Like