1

I'm trying to get Wine 5.0 installed on Ubuntu 16.04 64-bit.

I've added i386 arch, added their PPA to apt, did apt-get update, and then tried apt-get install --install-recommends winehq-stable wine-stable wine-stable-amd64, but I'm met with

The following packages have unmet dependencies.
 wine-stable-i386:i386 : Depends: libasound2:i386 (>= 1.0.16)
                         Depends: libc6:i386 (>= 2.23) but it is not going to be installed
                         Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed
                         Depends: libgphoto2-6:i386 (>= 2.5.9) but it is not going to be installed
                         Depends: libgphoto2-port12:i386 (>= 2.5.9) but it is not going to be installed
                         Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed
                         Depends: libgstreamer1.0-0:i386 (>= 1.4.0) but it is not going to be installed
                         Depends: liblcms2-2:i386 (>= 2.2+git20110628) but it is not going to be installed
                         Depends: libldap-2.4-2:i386 (>= 2.4.7) but it is not going to be installed
                         Depends: libmpg123-0:i386 (>= 1.13.7) but it is not going to be installed
                         Depends: libopenal1:i386 (>= 1.14) but it is not going to be installed
                         Depends: libpcap0.8:i386 (>= 0.9.8) but it is not going to be installed
                         Depends: libpulse0:i386 (>= 0.99.1) but it is not going to be installed
                         Depends: libudev1:i386 (>= 183) but it is not going to be installed
                         Depends: libx11-6:i386 but it is not going to be installed
                         Depends: libxext6:i386 but it is not going to be installed
                         Depends: libxml2:i386 (>= 2.9.0) but it is not going to be installed
                         Depends: ocl-icd-libopencl1:i386 but it is not going to be installed or
                                  libopencl1:i386
                         Depends: ocl-icd-libopencl1:i386 (>= 1.0) but it is not going to be installed or
                                  libopencl-1.1-1:i386
                         Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
                         Depends: libasound2-plugins:i386 but it is not going to be installed
                         Depends: libncurses6:i386 but it is not installable or
                                  libncurses5:i386 but it is not going to be installed or
                                  libncurses:i386 but it is not installable
                         Recommends: libcapi20-3:i386 but it is not going to be installed
                         Recommends: libcups2:i386 but it is not going to be installed
                         Recommends: libdbus-1-3:i386 but it is not going to be installed
                         Recommends: libfontconfig1:i386 but it is not going to be installed
                         Recommends: libfreetype6: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: libgnutls30:i386 but it is not going to be installed or
                                     libgnutls28:i386 but it is not installable or
                                     libgnutls26:i386 but it is not installable
                         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: libjpeg62-turbo:i386 but it is not installable or
                                     libjpeg8: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: libpng16-16:i386 but it is not going to be installed or
                                     libpng12-0:i386 but it is not going to be installed
                         Recommends: libsane:i386 but it is not going to be installed or
                                     libsane1:i386 but it is not installable
                         Recommends: libsdl2-2.0-0:i386 but it is not going to be installed
                         Recommends: libtiff5:i386 but it is not going to be installed
                         Recommends: libv4l-0:i386 but it is not going to be installed
                         Recommends: libxcomposite1:i386 but it is not going to be installed
                         Recommends: libxcursor1:i386 but it is not going to be installed
                         Recommends: libxfixes3:i386 but it is not going to be installed
                         Recommends: libxi6:i386 but it is not going to be installed
                         Recommends: libxinerama1:i386 but it is not going to be installed
                         Recommends: libxrandr2:i386 but it is not going to be installed
                         Recommends: libxrender1:i386 but it is not going to be installed
                         Recommends: libxslt1.1:i386 but it is not going to be installed
                         Recommends: libxxf86vm1:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Just for fun, I've tried to install libglib2.0-0:i386, but that wants to exchange the entire system, as predicted.

So, the questions are: Why does it depend on the i386 arch package, even on a amd64 host? How can I get Wine installed without this dependency, as I obviously don't want to switch to that arch?

What I also find curious: winehq-stable just provides symlinks into /opt/wine-stable/bin/*, which are in turn provided by wine-stable, but there is no /opt/wine-stable/bin/wine. Package wine-stable-amd64 only provides /opt/wine-stable/bin/wine64. What am I missing here?

Thanks.


Edit 1:

# apt-cache policy winehq-stable
winehq-stable:
  Installed: (none)
  Candidate: 5.0.0~xenial
  Version table:
     5.0.0~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     4.0.4~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     4.0.3~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     4.0.2~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     4.0.1~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     4.0~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.5~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.4~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.3~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.2~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.1~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     3.0.0~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     2.0.4~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     2.0.3~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     2.0.2~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     2.0.1~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
     2.0.0~xenial 500
        500 https://dl.winehq.org/wine-builds/ubuntu xenial/main amd64 Packages
9
  • Try using aptitude instead of apt-get.
    – Ollie
    May 18, 2020 at 12:49
  • This wants to install a whole lot of i386 libs. I presume this is correct, but there's also a lot of warnings of the like libc6 : Breaks: libc6:i386 (!= 2.23-0ubuntu9) but 2.23-0ubuntu3 is to be installed. Should I be worried if it downgrades libc6:i386? May 18, 2020 at 12:57
  • What is the output of apt-cache policy winehq-stable?
    – N0rbert
    May 18, 2020 at 16:32
  • @N0rbert added output of apt-cache policy winehq-stable as edit to the question. May 19, 2020 at 0:33

2 Answers 2

0

According to your sources.list, my assumption was correct - you have wrong repositories.

At first open Software & Updates (software-properties-gtk) and make it look like:

Ubuntu Software

Updates

or by changing the /etc/apt/sources.list file using text-editor opened as root to

deb http://archive.canonical.com/ubuntu xenial partner
deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse restricted

deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main

Then update package lists, install new dependencies and finally install Wine:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --install-recommends winehq-stable wine-stable wine-stable-amd64
0
0

Below are the steps for you to install Wine MANUALLY without having to deal with repositories.

Installing older/different versions of Wine than the latest ones from the repositories in Debian/Ubuntu system is a pain in the rear extremity.

Plan B: consider hopping over to Manjaro, if it's possible for you to do so. Why? Because the Manjaro version of the Wine package comes bundled IN A SINGLE PACKAGE, and you install it using A SINGLE COMMAND:

sudo pacman -U /local_path/wine-staging-5.1-1-x86_64.pkg.tar.zst
or, in the case you miss dependencies..
sudo pacman -Sy /path/wine...
(I think that's the command... I'm not in Manjaro right now,
the Sy command will download the dependencies for you 
WITHOUT performing a full system upgrade, only the packages you need...
pacman -U is the equivalent of sudo dpkg -i , for manual install)

OK. If hopping over to Arch/Manjaro is NOT a possibility for you, these below are the steps for MANUALLY installing older versions of Wine on Debian/Ubuntu-based distros:

  1. Let's say you want to install Wine version 4.1 (one of the last versions of Wine before the Wineprefix size increased from 100 MB straight to 600 MB, without no additional benefits and no avoidance of the usual bugs from the last 10 years...)
    Go to https://dl.winehq.org/wine-builds/
    and download all packages that have 4.1 in their name (they should have the same Date to them)

In the case of Wine 4.1 (the version that I've found to be the optimal one) these are the packages you need. You always will need FIVE packages in total.

winehq-staging_4.1_buster_amd64.deb
wine-staging_4.1_buster_amd64.deb
wine-staging_4.1_buster_i386.deb
wine-staging-amd64_4.1_buster_amd64.deb
wine-staging-i386_4.1_buster_i386.deb
  1. Installation order. Here comes the tricky part, after you do it the 1st time it should be easier the next times. First, you install the biggest i386 package, always. Then, you install the small i386 package. Then, install the big amd64 package, and the small amd64 package. The last to be installed should be winehq (which only comes in amd64 form)

Below is a copy of my bash history with the order of commands I used to do this in shortest time.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo dpkg -i /path/wine-staging-i386_4.1_buster_i386.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging_4.1_buster_i386.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging-amd64_4.1_buster_amd64.deb
sudo apt-get install -f
sudo dpkg -i /path/wine-staging_4.1_buster_amd64.deb
sudo apt-get install -f
sudo dpkg -i /path/winehq-staging_4.1_buster_amd64.deb
sudo apt-get install -f
sudo apt-get update
...
winecfg    <used to create the initial Wine prefix>
<use these ones below to reassure that you have all libs installed correctly>
...
WINEPREFIX=~/.wine32 WINEARCH=win32 winecfg  <to test if 32-bit is working OK>
WINEPREFIX=~/.wine64 WINEARCH=win64 winecfg  <to test if 64-bit is working OK>
<you should not see errors in the terminal of the type
"but the wrong architecture is being used" >

Notice how you need to run

sudo apt-get install -f  

every single time each package is installed. That will guarantee that the individual dependencies to each package are installed and configured, before you install the next package. (this is only needed the 1st time you do this... after that, you can put all these dependencies, store them in a Backup location, and install them all-at-once using sudo dpkg -i /path/*.deb )

  1. Sometimes, and I don't understand why this happens, you won't be able to use Wine 64 bits, or you won't be able to use Wine 32 bits, one of the two. If that happens, simply re-install one of the big Wine packages again (depending if you need amd64 or i386)

    sudo dpkg -i /path/wine-staging-amd64_4.1_buster_amd64.deb

It's very unfortunate that Wine has been distributed like this on Debian/Ubuntu system, it's an overcomplicated process with a lot of time wasted. The way Manjaro does it should become the official way Wine is distributed from now on.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .