How to get out of Wine Dependency hell


How to get out of Wine Dependency hell (aka I just installed Lutris to run wine games and *forgot* to install everything wine related):

Preface (You can skip this to the instructions below if you don’t need an explanation):

Dependencies are libraries and programs that another program needs in order to be able to run and/or be compiled. This is why binary pre-compiled blobs are bad and why many people choose to use compile-friendly distros like Arch, Gentoo, OpenSUSE and the like. When you compile something, it uses the libraries found natively on your system, and you know what’s being used to build the program in addition to the option to view/modify/patch the code.

Example –

Say I’m on Ubuntu, right? Let’s say I have all the libraries I need for Wine. So I compile wine into a binary blob package and put it on a ppa for people to use. Here’s the problem — many of wines libraries are marked as optional.
So I could have libraries I built with that you dont have. Also let’s say its not marked as a dependency on my binary blob package. So you install the package, your game keeps crashing, and you’re like what the hell?? Turns out you don’t have all the libraries it needs, or a version of the libraries I used is different from the ones on your system. There’s no way to tell that though because i didnt put them in the package dependency requirements, and wine lists them as optional.

If you look here:

Look at depends, makedepends, and optdepends. You literally want ALL of those installed before compiling+installing wine. A binary blob package isn’t gonna tell you that unless the person who made the package specified it. The Arch PKGBUILD above was made by a user, who was kind enough to tell other users everything necessary to build and run the program.

Runtimes –

Some programs come with their own set of “runtimes” – their own versions of libraries, in order to remedy this problem. Lutris does it, Steam does it, as well as many games.

Example –

What the lutris runtimes do is it makes lutris use a copy of the “runtime” libraries packaged with lutris that they used to compile their “runners” – versions of wine. Steam does something very similar with Ubuntu runtimes. Sometimes however, even then there can be version problems but for the most part it works.

So why do I want to install all the packages if runtimes are available? Ideally it’s better to have native libraries than using pre-shipped runtimes because your system knows how to use them as opposed to runtimes that were again – built on another system. This comes down to versioning.

Versioning –

Say I have a game that crashes using the library glibc 2.x but works on 2.y. That glibc may not crash all games, but it crashes this one. So I find out my system has glibc 2.y.. Great! Yay! So I’d want to disable the runtimes because the ones packaged came with 2.x. This is where the trouble starts. If i dont have -all- the libraries I need – I face possible crashes due to other missing libraries because my system doesn’t have all the library dependencies – hence I am officially in Wine Dependency hell.

Install all the wine dependencies on your system natively, disable runtimes when possible so that the program doesnt rely on it’s own runtimes, and only use runtimes selectively when needed.


Antergos/Manjaro/Arch derivatives (enable multilib in pacman.conf):

sudo pacman -Sy
sudo pacman -S wine-staging winetricks
sudo pacman -S giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader cups samba dosbox


sudo eopkg install wine wine-devel wine-32bit-devel winetricks


sudo dpkg --add-architecture i386
wget -nc
sudo apt-key add winehq.key
sudo apt-add-repository ''
sudo apt update
sudo apt install --install-recommends winehq-staging
sudo apt install winetricks


sudo dpkg --add-architecture i386
wget -nc
sudo apt-key add winehq.key

# For Linux Mint 17.x:

sudo apt-add-repository 'deb trusty main'

# For Linux Mint 18.x:

sudo apt-add-repository 'deb xenial main'

# For Linux Mint 19.x:

sudo apt-add-repository 'deb bionic main'


sudo apt update
sudo apt install --install-recommends winehq-staging
sudo apt install winetricks

If apt-get complains about missing dependencies, install them, then repeat the last two steps (update and install).


sudo dpkg --add-architecture i386

wget -nc
sudo apt-key add winehq.key

# For Debian Wheezy add the following line:

deb wheezy main

# For Debian Jessie this one:

deb jessie main

# For Debian Stretch this one:

deb stretch main

# For Debian Buster this one:

deb buster main

# And for Debian Sid this one:

deb sid main

sudo apt-get update
sudo apt-get install winehq-staging
sudo apt-get install winetricks


sudo dnf install alsa-plugins-pulseaudio.i686 glibc-devel.i686 glibc-devel libgcc.i686 libX11-devel.i686 freetype-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXext-devel.i686 libXxf86vm-devel.i686 libXrandr-devel.i686 libXinerama-devel.i686 mesa-libGLU-devel.i686 mesa-libOSMesa-devel.i686 libXrender-devel.i686 libpcap-devel.i686 ncurses-devel.i686 libzip-devel.i686 lcms2-devel.i686 zlib-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 cups-devel.i686 libxml2-devel.i686 openldap-devel.i686 libxslt-devel.i686 gnutls-devel.i686 libpng-devel.i686 flac-libs.i686 json-c.i686 libICE.i686 libSM.i686 libXtst.i686 libasyncns.i686 liberation-narrow-fonts.noarch libieee1284.i686 libogg.i686 libsndfile.i686 libuuid.i686 libva.i686 libvorbis.i686 libwayland-client.i686 libwayland-server.i686 llvm-libs.i686 mesa-dri-drivers.i686 mesa-filesystem.i686 mesa-libEGL.i686 mesa-libgbm.i686 nss-mdns.i686 ocl-icd.i686 pulseaudio-libs.i686 sane-backends-libs.i686 tcp_wrappers-libs.i686 unixODBC.i686 samba-common-tools.x86_64 samba-libs.x86_64 samba-winbind.x86_64 samba-winbind-clients.x86_64 samba-winbind-modules.x86_64 mesa-libGL-devel.i686 fontconfig-devel.i686 libXcomposite-devel.i686 libtiff-devel.i686 openal-soft-devel.i686 mesa-libOpenCL-devel.i686 opencl-utils-devel.i686 alsa-lib-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pulseaudio-libs-devel.i686 pulseaudio-libs-devel gtk3-devel.i686 libattr-devel.i686 libva-devel.i686 libexif-devel.i686 libexif.i686 glib2-devel.i686 mpg123-devel.i686 mpg123-devel.x86_64 libcom_err-devel.i686 libcom_err-devel.x86_64 libFAudio-devel.i686 libFAudio-devel.x86_64

sudo dnf groupinstall "C Development Tools and Libraries"
sudo dnf groupinstall "Development Tools"

sudo dnf install wine