How To Install WineHQ on AlmaLinux 9

This guide intends to teach you How To Install WineHQ on AlmaLinux 9.

Wine is a compatibility layer for operating systems. The framework library Wine (originally an acronym for “Wine Is Not an Emulator”) is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, OS X, Solaris, and Free BSD.

Steps To Install WineHQ on AlmaLinux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with AlmaLinux 9.

Install Wine on AlmaLinux 9

By default, the Wine repository is not available in the default AlmaLinux repository. You need to build it from the source. First, update your local package index with the following command:

sudo dnf update -y

Install Epel Repository

Then, you need to install the Epel release on your server:

sudo dnf install epel-release -y

Enable PowerTools (crb) on AlmaLinux 9

Here you need to enable the power tools with the following command:

sudo dnf config-manager --set-enabled crb

Install Development Tools

Next, install the development tools that you need to build the Wine Source code on your AlmaLinux 9 with the command below:

sudo dnf groupinstall 'Development Tools' -y

Also, you need to install the required packages on your server with the following command:

sudo dnf -y install gcc libX11-devel freetype-devel zlib-devel \  libxcb-devel libxslt-devel libgcrypt-devel libxml2-devel \  gnutls-devel libpng-devel libjpeg-turbo-devel \  libtiff-devel dbus-devel fontconfig-devel

Download and Build WineHQ From Source

Now you need to visit the WineHQ Downloads Page to copy the link address of the latest release and use the wget command to download it from the source:

sudo wget https://dl.winehq.org/wine/source/7.x/wine-7.18.tar.xz

Extract your downloaded file with the following command:

sudo tar xvf wine-*.tar.xz

Then, switch to your Wine directory on AlmaLinux 9:

cd wine-*/

At this point, you can configure and install Wine with the following commands:

sudo ./configure --enable-win64
sudo make install

This will take some time to complete.

Verify Wine Installation

Verify your Wine installation on AlmaLinux 9 by checking its version:

wine64 --version
Output
wine-7.18

Finally, you can start installing Windows programs on your AlmaLinux.

The syntax of it is like this:

wine64 ./path-to-your file.exe

Conclusion

At this point, you have learned to Install WineHQ on AlmaLinux 9.

Hope you enjoy it.

For more guides and articles you can visit Linux Tutorials from the OrcaCore website.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!