Install Wine on Rocky Linux 8

This tutorial will take you through how to install Wine on Rocky Linux 8. According to winehq.org, Wine is a software that enables Linux, Mac, FreeBSD, and Solaris users to run Windows applications without a copy of Microsoft Windows. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.

Install Wine on Rocky Linux 8

In this setup, we will install Wine on Rocky Linux 8 desktop version;

hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: aa517e751c5c4aac9446a902686e3fb0
           Boot ID: ac26b208e38643f6be3e035d75708617
    Virtualization: oracle
  Operating System: Rocky Linux 8.4 (Green Obsidian)
       CPE OS Name: cpe:/o:rocky:rocky:8.4:GA
            Kernel: Linux 4.18.0-240.22.1.el8.x86_64
      Architecture: x86-64

Epel repos provides Wine packages, which would make the installation of Wine easy. However, the Wine packages provided by Epel may not be up-to-date.

dnf provides wine

Sample output;

wine-4.0.4-1.el8.x86_64 : A compatibility layer for windows applications
Repo        : epel
Matched from:
Provide    : wine = 4.0.4-1.el8

As of this writing, Wine 6.0.1 is the current stable release. You can check on WineHQ page.

Install latest Wine from Source code on Rocky Linux 8

To install the current stable release, you need to build it from the source code as follows.

Install required build tools

Enable Powertools and EPEL repos which provides other packages as well;

dnf install epel-release -y
dnf config-manager --set-enabled powertools

Run the command below to install required build tools and package dependencies.

dnf install mingw64-gcc alsa-lib-devel pulseaudio-libs-devel dbus-libs \
make flex bison fontconfig-devel freetype-devel mingw32-gcc gnutls-devel libjpeg-turbo-devel \
libpng-devel libtiff-devel mesa-libGL-devel libunwind-devel libxml2-devel libxslt-devel gcc

You can get a complete list of required package dependencies on Satisfying_Build_Dependencies.

Download Wine Source Code

Navigate to WineHQ download server and grab the source code for the current stable release version of Wine, v6.0.1, as of this writing.

You can simply grab the link and pull it using wget command;

wget https://dl.winehq.org/wine/source/6.0/wine-6.0.1.tar.xz

Compile and install Wine from Source code

Extract the source code;

tar xJf wine-6.0.1.tar.xz

Navigate to the top-level directory of the Wine source;

cd wine-6.0.1

Next, configure Wine. We are only building Wine for 64-bit programs.

./configure --enable-win64

For any other feature that you might want to enable, then install the respective library and rerun the configure script.

Next, compile Wine;

make

The compilation command will take a reasonable amount of time, depending on your system resources.

Remove any existing versions of Wine;

dnf remove wine

Install Wine on Rocky Linux 8

make install

Wine will be installed as wine64.

Once the installation command is done, you can run the command below to check the path to wine64 binary;

which wine64

sample output;

/usr/local/bin/wine64

Since Wine is on the current PATH, then you can start using it;

For example, to confirm the installed version;

wine64 --version

Sample output;

wine-6.0.1

Using Wine to run Windows Apps on Rocky Linux 8

Just for demo purposes, we have downloaded a PuTTY.exe to current directory. To run PuTTY on Rocky Linux 8 with Wine, then execute the command below;

wine64 putty.exe

When prompted to install Wine Mono/Gecko installer, proceed to do so.

Install Wine on Rocky Linux 8

And that conclude how to install Wine on Rocky Linux 8.

Further Reading

Wine Documentation

Other Tutorials

Install Node.js/NPM on Rocky Linux 8

Install Yarn on Rocky Linux 8

Founder of itnixpro.com|Linux Engineer|Author at Itnixpro.com

Leave a Comment