Can't install wine from winehq.org on Ubuntu (actually Lubuntu) 18.04 LTS

17,805

Solution 1

Analysis

The WineHQ repository misses the dependencies for wine-stable package.
I have reported a bug 48513 to WineHQ bugzilla.

The main problem here is bad documentation, which is written in non-reproducible way.
The Rosanne DiMesio's main idea is "People who don't bother to read the directions are always going to have problems.".

So we need to write our own documentation until WineHQ-officials become smarter.

The problem with dependencies was caused by the FAudio dependency, which is not contained in Debian/Ubuntu and WineHQ repositories. We can determine the exact package name by using command below and analyzing of their output:

$ sudo apt-get install wine-stable-amd64
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-amd64 : Depends: libfaudio0 but it is not installable
                     Recommends: libcapi20-3 but it is not going to be installed
                     Recommends: libodbc1 but it is not going to be installed
                     Recommends: libosmesa6 but it is not going to be installed
                     Recommends: libsdl2-2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The aforementioned libfaudio0 package is available only for Ubuntu 19.10 and upcoming 20.04 LTS.


Solution

We need to follow official WineHQ guide for Ubuntu partially:

sudo dpkg --add-architecture i386
sudo apt update

Note: if you have WineHQ repository added - remove it with

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

to prevent the mess of repositories and then proceed.

Then we need to add other repository from OpenSuse Build Service to get libfaudio0 installed:

wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key -O Release.key -O- | sudo apt-key add -
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'
sudo apt-get update

and only after this install one of WineHQ packages:

# Stable branch     
sudo apt install --install-recommends winehq-stable

#Development branch     
#sudo apt install --install-recommends winehq-devel

#Staging branch     
#sudo apt install --install-recommends winehq-staging

Solution 2

Just an FYI, the Wine team have no intention of updating their misleading documentation, so this will continue to be problem on any distro based on 18.04 LTS:

The problem is with your system, not the packages.

You are probably missing FAudio, which is now a dependency for wine-stable, as stated clearly at the top of https://wiki.winehq.org/Ubuntu. The wiki also directs users to https://forum.winehq.org/viewtopic.php?f=8&t=32192 for instructions on how to install FAudio for bionic. Apparently you overlooked that part.

If that doesn't fix it, follow the instructions in https://wiki.winehq.org/FAQ#How_do_I_solve_dependency_errors_when_trying_to_install_Wine.3F to figure out exactly what dependencies you are missing. If you need further help, ask for it on the forum. Bugzilla is not for user support.

Friendly.

Solution 3

As another temporary solution, you may install previous version with command

apt-get install -y --install-recommends winehq-stable=4.0.3~bionic \
wine-stable=4.0.3~bionic wine-stable-amd64=4.0.3~bionic wine-stable-i386=4.0.3~bionic

It can be upgraded after maintainers fix their repository.

Share:
17,805

Related videos on Youtube

Ben W
Author by

Ben W

Updated on September 18, 2022

Comments

  • Ben W
    Ben W over 1 year

    I have followed all the instructions on the winehq page. In particular, I have run the following commands:

    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' 
    

    The first three of the above seemed to work fine. However, the last command gives me the following error:

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

    I'm running Lubuntu 18.04.3 on a USB live stick. (However, if I remember correctly, a couple days ago I got the exact same error on a normal hard disk Lubuntu 18.04.3 installation.)

    I've read that a lot of people get similar errors. Unfortunately I haven't found any solutions online that worked.

    Any help would be much appreciated. Thanks!

    EDIT: Thanks for the comments and suggestions everyone. I'll try them out later today.

    In the mean time, here's something I don't understand. Ubuntu 18.04 has been around for almost two years now. In all that time, surely somebody has successfully installed wine, right? What did they do to get it working?

    • Kenivia
      Kenivia over 4 years
      you selected i386. maybe try a 64-bit architecture if you are on a 64-bit machine
    • guiverc
      guiverc over 4 years
      You have held broken packages; thus fix the issues you already have. eg. try sudo apt -f install. Also note 'live' systems work from a created '/' file system in memory; it's not very big (regardless of how many gb/tb of ram you have, it's size is pre-determined so it'll boot in 1gb-128gbs of ram) so you can eventually reach that limit in a 'live' system then it's easier to reboot & start again in my experience than fix (due space problems on /)
    • guiverc
      guiverc over 4 years
      The package mentioned isn't from a Ubuntu source (packages.ubuntu.com/…)
    • Sergio
      Sergio over 4 years
      I'm experiencing the exact same issue. I'm running those commands from a Dockerfile when building a Docker image based on ubuntu:18.04.
    • trond hansen
      trond hansen about 4 years
      i have tried to install this too on ubuntu 18.04 and on 19.10 installs normally from software senter but it will not start when i try to launch it and it is not visible in programs(it shows as installed in software senter)i have tried v4 and the latest version 5.0,from what i have found on the net the problem is known atleast in version 5.0.
    • Organic Marble
      Organic Marble about 4 years
      Addressing your final paragraph - if a user is ok with an old version of wine (3.0) they can just install wine-stable from the universe repo. That's what I did and probably many others who don't wish to add ppas. askubuntu.com/a/1097731/243321
    • Robert
      Robert over 3 years
      @Sergio: you need to base your image on ubuntu:19.10 or better ubuntu:20.04 in order to fulfill the dependency on libfaudio0
  • Ben W
    Ben W over 4 years
    Well it seems to be working. Thank you so much!
  • Ben W
    Ben W over 4 years
    This solution works. Wine has been successfully installed, and I verified it by installing and running a windows program.
  • Danie de Jager
    Danie de Jager over 4 years
    I can't add the repo. I get: # apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/‌​Debian/xUbuntu_18.04‌​/ ./' Malformed input, repository not added.
  • N0rbert
    N0rbert over 4 years
    @DaniedeJager please try again. I have just tested this method, it is fully functional. Other possibility is that your firewall, proxy or ISP may block access to the opensuse repositories.
  • Mark Jeronimus
    Mark Jeronimus over 4 years
    In my case, all steps were successful until the very last sudo apt install which still gives the exact same error. This is for i386; amd64 installs fine now, but only having that doesn't give me a wine executable. Btw, the developers deemed the bug report 'invalid' and they also added an ambiguous warning about libfaudio0 at their install page.
  • N0rbert
    N0rbert over 4 years
    @MarkJeronimus Thanks for testing, but on my clean 18.04 LTS VM I can install all 3 versions of Wine while following above method. But on other systems results may vary because of third-party repositories added. I hope that our methods will become unneeded after some time (when WineHQ release new and reproducible documentation).
  • Terrance
    Terrance over 4 years
    Your answer worked perfect for me and you got my +1 =) The only thing is that I had to remove the libfaudio0-i386 manually because it would not get upgraded nor did it uninstall when I removed any previous version and that app was giving me a headache! But once removed, Wine 5.0 installed perfectly with just enabling the OpenSuse repo along with my WineHQ repo as well. =) BTW, I removed my comment from the answer below. :)
  • Andor Kiss
    Andor Kiss over 4 years
    Thanks, this worked for the upgrade from 4.x to 5.0 on vanilla 18.04 LTS.
  • Ben W
    Ben W over 4 years
    I had installed the proprietary codecs stuff during the initial install of lubuntu, so maybe that's why I didn't need to use this additional command. Otherwise, it was a pretty fresh install, so I'm not sure why it didn't work for you.
  • Ben W
    Ben W about 4 years
    lol.............
  • lefterav
    lefterav about 4 years
    I still get an error: "The following packages have unmet dependencies: winehq-stable : Depends: wine-stable (= 5.0.0~bionic)"
  • N0rbert
    N0rbert about 4 years
    @lefterav please follow guide above carefully, line by line. I have tested it yesterday again, it is correct.
  • Sparkzz
    Sparkzz about 4 years
    Note: In case if you keep getting dependency issues then there is a high probability that you went into having some broken dependencies. To fix that automatically run sudo apt --fix-broken install
  • IronEagle
    IronEagle over 3 years
    Is the opensuse repository now closed? I can't seem to add it, and it doesn't respond if I try to download the key.
  • N0rbert
    N0rbert over 3 years
    @IronEagle I have just added the OpenSuSe repo successfully on fresh 18.04 LTS VM. So you have some networking issues.
  • Tibor Nagy
    Tibor Nagy over 3 years
    I have the same problem as @lefterav. apt --fix-broken install do not report any error.
  • N0rbert
    N0rbert over 3 years
    @TiborNagy please try again. Please follow guide above carefully, line by line. I have just tested this method again on fresh 18.04 LTS, it is fully functional. Other possibility is that your firewall, proxy or ISP may block access to the opensuse repositories.
  • Tibor Nagy
    Tibor Nagy over 3 years
    @N0rbert I did again (and again...). As I mentioned I got the same error as @lefterav above: The following packages have unmet dependencies: winehq-stable : Depends: wine-stable (= 5.0.3~bionic) E: Unable to correct problems, you have held broken packages. Note that this is an upgrade from 16.04 not a fresh one.
  • N0rbert
    N0rbert over 3 years
    @TiborNagy The main problem here is bad documentation, which is written in non-reproducible way. Let's solve your problem in your question, not here.
  • Arun Joseph
    Arun Joseph almost 3 years
    The person who replied on the submitted bug is very rude. They could have easily made clear documentation, but.....
  • Mark Jeronimus
    Mark Jeronimus over 2 years
    Just found out Wine-hq dependencies were fixed in November 2021 and I was finally able to upgrade wine-stable! forum.winehq.org/viewtopic.php?f=8&t=32192#p121683