14

I'm trying to run games through Lutris and followed their wiki on installing wine-staging.

When running:

$ sudo apt install --install-recommends winehq-staging

I get the error they predict, but then when running:

$ sudo apt install --install-recommends winehq-staging wine-staging wine-staging-i386

I still have the unmet dependencies error (output below).

Could anyone direct me to a solution?

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-staging : Depends: wine-staging-amd64 (= 4.13~bionic) but it is not going to be installed
 wine-staging-i386:i386 : Depends: libfaudio0:i386 but it is not installable
                          Recommends: libcairo2:i386 but it is not going to be installed
                          Recommends: libcapi20-3:i386 but it is not going to be installed
                          Recommends: libcups2:i386 but it is not going to be installed
                          Recommends: libglu1-mesa:i386 but it is not going to be installed or
                                      libglu1:i386
                          Recommends: libgsm1:i386 but it is not going to be installed
                          Recommends: libgssapi-krb5-2:i386 but it is not going to be installed
                          Recommends: libgtk-3-0:i386 but it is not going to be installed
                          Recommends: libkrb5-3:i386 but it is not going to be installed
                          Recommends: libodbc1:i386 but it is not going to be installed
                          Recommends: libosmesa6:i386 but it is not going to be installed
                          Recommends: libpcap0.8:i386 but it is not going to be installed
                          Recommends: libsane:i386 or
                                  libsane1:i386 but it is not going to be installed
                          Recommends: libv4l-0:i386 but it is not going to be installed
                          Recommends: libva-drm2:i386 but it is not going to be installed or
                                      libva-drm1:i386 but it is not installable
                          Recommends: libva-x11-2:i386 but it is not going to be installed or
                                      libva-x11-1:i386 but it is not installable
                          Recommends: libva2:i386 but it is not going to be installed or
                                      libva1:i386 but it is not installable
                          Recommends: libxcomposite1:i386 but it is not going to be installed
                          Recommends: libxslt1.1:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
  • 2
    This question is not really a duplicate, as it is wine specific. libfaudio0 is missing in ubuntu repositories. To add it run sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport and then sudo apt install --install-recommends winehq-staging to install winehq – white Aug 14 '19 at 07:28
  • @white The question is reopened, you may add your alternative solution as another answer now. – Byte Commander Aug 15 '19 at 22:02

4 Answers4

23

I followed the instructions found here to download the missing libfaudio:i386.

Ubuntu 18.04:

wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key

sudo apt-key add Release.key

Add the repository:

sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'

Then update:

sudo apt update
  • I tried using the repos in the other answers (the ppa:cybermax-dexter/sdl2-backport repo) and it horribly broke things. It wouldn't install because it conflicted with libfaudio (vs. libfaudio0), and no amount of shuffling helped. While I didn't add the repo above directly, I did download the libfaudio i386 and amd64 manually, and then wine-staging finally installed correctly! – Scott Dec 08 '19 at 02:59
15

I had similar problem, I went down a few different rabbit-holes so thought it might help others if I detail my solution. I am not particularly au fait with the apt packaging process or wine so I will list out everything that I went through from upgrading from wine3.0 to wine5.0 on ubuntu 18.04.4 LTS.

  1. Purge all from APT!
sudo apt-get purge *wine*
  1. Check that there's no snaps installed too (for some reason i had this - not sure if it would impact so i assumed best to remove)
sudo snap remove wine
sudo snap update wine-platform-*
  1. Remove the PPA official repos (they changed how they packaged this). We need to dig inside /etc/apt
grep -Ril "wine" /etc/apt

If you get any matches comment them out or delete the keys, we will fully re-add later.

  1. Enable 32-bit & add new repo (check here for other ubuntu versions)
sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt upgrade
sudo apt --fix-broken install
sudo apt autoremove --purge
sudo apt upgrade
  1. Let's get the libfaudio & libasound2 which are the broken repos:
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key
sudo apt-key add Release.key
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'
sudo apt update
sudo apt install libfaudio0 libasound2-plugins:i386 -y
  1. Now we can install wine 5.0 as normal!
sudo apt install --install-recommends winehq-stable -y
robmsmt
  • 421
  • 1
    While attempting to set up Wine for Lutris per this page, I kept running into unmet dependency issues, despite their solution for that exact issue. Your answer actually resolved the problem. Thank you! – Baku9 Feb 05 '20 at 05:46
  • Just step 5 and 6 was enough to fix the issue for me – Sjoerd de Wit Mar 03 '20 at 12:21
  • 1
    For me, all unmet dependencies trace back to libpulse0:i386; this prevents installing the packages in the last line in your step 5. Any ideas? – Miguel Mar 20 '20 at 10:25
  • only step 5 is needed – Ufos Apr 01 '20 at 14:16
4

As pointed out by @chilly-chease, libfaudio0:i386 package is missing in ubuntu 18.04 repositories.

The most simple way to fix it would be:

  1. sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
  2. sudo apt install --install-recommends winehq-staging
white
  • 157
  • 4
  • I have no idea why you were downvoted. Apart from the missing sudo apt-get update which is required between 1 and 2 this should work. – daniels_pa Dec 28 '19 at 18:26
  • 2
    Doesn't work for me. I still complains about: The following packages have unmet dependencies: wine-staging-i386:i386 : Depends: libfaudio0:i386 but it is not going to be installed Depends: libpulse0:i386 (>= 0.99.1) but it is not going to be installed Depends: libasound2-plugins:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages. – Melroy van den Berg Jan 14 '20 at 00:13
  • @danger89 Same here on ubuntu 18.04. The fix: removed ppa:cybermax-dexter/sdl2-backport, reinstalled the default ubuntu versions of the files modified by the above repo; downloaded and installed the libfaudio0 amd64 and i386 libs from the above opensuse links; problem solved, I was able to install wine 5. I 'think' I read somewhere that ppa:cybermax-dexter/sdl2-backport is no longer up to date for bionic?? You can try the sudo apt-add-repository way of installing libfaudio0 as suggested in Chilly Cheese's answer, I didn't try. – alwaysask Jan 23 '20 at 12:05
  • Yup indeed. Opensuse repo does work. I have wine v5 correctly installed. – Melroy van den Berg Jan 24 '20 at 13:10
  • 1
    missing sudo apt-get update after adding the repo – isebarn Aug 16 '20 at 08:37
0

When you first executed:

sudo apt install --install-recommends winehq-staging

You left your package manager in a broken state and you need to remove all wine related packages first and get a working package state:

sudo apt remove winehq-staging wine\*
sudo apt install -f

Once you have your package manager in a working state you can try the workaround command of avoiding installing some recommended packages.

Byte Commander
  • 107,489
  • remove: E: Unable to locate package winehq.key – Oded Sayar Aug 07 '19 at 23:53
  • It does seem to work if I replace wine-staging with wine-stable, but I figure staging is better for running games – Oded Sayar Aug 08 '19 at 00:06
  • You are running the wrong commands and trying to pass a file as a package nane – Kristopher Ives Aug 09 '19 at 01:35
  • Always quote 'wine*' or escape wine\* package globs - otherwise they will be expanded by the shell as file globs, if you have any matching files in your current directory. That's likely what happened in @OdedSayar 's case. I'm editing your command. – Byte Commander Aug 15 '19 at 21:57