How to install Wine on CentOS 8 and RHEL

In this article, we will see how to install Wine on CentOS 8 and RHEL.

What is wine?

Wine is a compatibility layer capable of running Windows based applications on several POSIX-compliant operating systems, such as Linux/Unix, macOS, & BSD.

Finally, the Wine team announced the stable release of 5.0.2 and made available for download in source and binary packages for various distributions.

In this article, we will show you simple way to install the latest release of Wine 5.0.2 version in RHEL and CentOS using source code.

Install Wine on CentOS 8 and RHEL:

Note: In CentOS 8/RHEL 8, yum package manager no longer in use, so we should use dnf command.

1. Install dependency packages

dnf -y groupinstall 'Development Tools'

dnf 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

2. Download the Wine Source Code

wget https://dl.winehq.org/wine/source/5.0/wine-5.0.2.tar.xz

3. Extract source code using tar command.

dtar -xvf wine-5.0.2.tar.xz -C /tmp/

4. Navigate to wine directory and run the below commands as root user.
Following steps take more time.

cd wine-5.0.2/ sudo ./configure --enable-win64 sudo make sudo make install

5. Once the installation completes run the “winecfg” configuration tool from GNOME desktop to see the supported configuration. If you don’t have any of the desktops, you can install it by using the below command as the root user.

dnf groupinstall workstation

6. Once the X Window System installed, run the command as a normal user to see wine configuration.

winecfg

7. Select Windows version and click on apply.

8. To run the Wine, you must specify program name as shown in the example below.

For 64-bit:

wine64 notepad wine64 wordpad

For 32-bit:

wine notepad wine notepad