Do you want to run Windows applications on AlmaLinux or Rocky 8? Then install Wine HQ to use graphical Microsoft Windows applications on Linux.
Wine ( W ine I s N ot to E mulator) is a program that can be used to run Windows software on Linux. You do not need to install any virtual machine on your computer to be able to start programs with Wine that have been programmed for Windows.
It provides the actual runtime environment and Windows API (Application Programming Interface) and is based on the laborious reconstruction of the non-open Windows source code through experimentation and reverse engineering. That is the reason, still, after 20 years of development, there is no guarantee that it will be able to run the program properly. However, it is enough sufficient to install and run common Windows programs sometimes even complex ones such as Photoshop.
Here we learn the commands to set up Wine on AlmaLinux and the process will be the same for other RPM-based Linux systems such as CentOS 8, Rocky Linux, Fedora, and RHEL 8.
Steps to install Wine on AlmaLinux or Rocky 8
Step 1: Run system update
Before setting up anything let’s first install the available updates for the system packages using DNF. The given command will also refresh the repos.
sudo dnf update
Step 2: Enable EPEL and PowerTools
As there is no official repository of Wine for AlmaLinux or Rocky, we will build it from the source. Therefore for building source code, we need development tools and some other the required dependencies available in EPEL. Thus, enable it first:
sudo dnf install epel-release sudo dnf config-manager --set-enabled powertools
Step 3: Install Development Tools and other dependencies
Now, install the Development tools that we needed to build the Wine Source code on our AlmaLinux system.
sudo dnf groupinstall 'Development Tools' -y
Apart from the above command, run this one as well for additional dependencies.
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
Press Enter Key and give your permission to start the installation.
Step 4: Download Wine HQ’s latest source code
To compile the source code, let’s download the latest available one i.e Wine 6.1. You can go for any other version as well. Check out the available versions on the official page.
sudo dnf -y install wget
wget https://dl.winehq.org/wine/source/6.x/wine-6.1.tar.xz
Note: For any other Wine Source code version, the above command will be the same, just change the version number given in it.
Step 5: Make and install Wine on AlmaLinux 8 or Rocky
Let’s now extract and compile the WineHQ code on the system :
tar xvf wine-*.tar.xz
Build and Compile:
cd wine-*/ ./configure --enable-win64 make sudo make install
sudo dnf install wine
The make command will take some time
Step 6: Check the installed Wine Version
To confirm that it is configured on the system successfully, let’s check its version.
wine64 --version
Step 7: Start installing Windows Software
Now, start installing the Windows programs that you want to run on your AlmaLinux or Rocky.
the syntax is:
win64 ./path-to-your file.exe
Really we got interesting and important information from this.
The build part on Rocky 8.7 took more than an hour. But you left out the following command:
sudo dnf install wine
After running that I had a working copy of Wine 6.0.2.