How to Install Wine 32-bit on CentOS 8

Since version 7, RHEL and CentOS only have 64 bit versions. For some reasons, it’s better to run many Windows applications under 32 bit wine. Like How to Install Wine 32-bit on CentOS 7, this post introduce how to install 32-bit Wine on CentOS 8.

Most of the mechanisms are similar yet there are differences. The idea is to build both the 64-bit and 32-bit Wine from the source package following the specific order of 64-bit -> 32-bit -> 64-bit. In this post, we give a quick tutorial on how to do that on CentOS 8. The fixes to make the script for CentOS 7 work on CentOS 8 to install 32-bit Wine is contributed by Mika Knuutila.

Download install-wine-i686-centos8.sh

Download the script for installing Wine 32-bit on CentOS 8: install-wine-i686-centos8.sh.

Execute the script as root

Run as root or through sudo:

# ./install-wine-i686-centos8.sh

The process may take some while. Please be patient. One example output is as follows.

Hello there. Start to download, build and install wine 5.0 32-bit version...
Logs are in /tmp/install-wine.BsQMcC.log
Enabling needed repos and update...
warning: /var/cache/dnf/AppStream-a520ed22b0a8a736/packages/conmon-2.0.6-1.module_el8.1.0+272+3e64ee36.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Uninstall old wine if you have installed it...
Modular dependency problems:

 Problem 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
 Problem 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
No packages marked for removal.
Install wine building tools...
warning: /var/cache/dnf/epel-6519ee669354a484/packages/ImageMagick-6.9.10.86-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Download and unpack the wine source package...
--2020-03-27 10:28:23--  http://dl.winehq.org/wine/source/5.0/wine-5.0.tar.xz
Resolving dl.winehq.org (dl.winehq.org)... 151.101.130.217, 151.101.194.217, 151.101.2.217, ...
Connecting to dl.winehq.org (dl.winehq.org)|151.101.130.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22469428 (21M) [application/x-xz]
Saving to: ‘wine-5.0.tar.xz’

wine-5.0.tar.xz             100%[===========================================>]  21.43M  10.6MB/s    in 2.0s    

2020-03-27 10:28:25 (10.6 MB/s) - ‘wine-5.0.tar.xz’ saved [22469428/22469428]

Build wine...
   build wine64...
../../../tools/wrc/parser.y: warning: 5 shift/reduce conflicts [-Wconflicts-sr]
../../../tools/wrc/parser.y: warning: 5 shift/reduce conflicts [-Wconflicts-sr]
../../../dlls/jscript/parser.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../dlls/jscript/parser.y: warning: 18 reduce/reduce conflicts [-Wconflicts-rr]
../../../dlls/msi/sql.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
warning: can't write value of type 12 yet
../../../dlls/vbscript/parser.y: warning: 10 shift/reduce conflicts [-Wconflicts-sr]
../../../dlls/vbscript/parser.y: warning: 10 shift/reduce conflicts [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
../../../programs/winedbg/dbg.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
   build wine32...

configure: WARNING: libxslt 32-bit development files not found, xslt won't be supported.
../../../dlls/jscript/parser.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../dlls/jscript/parser.y: warning: 18 reduce/reduce conflicts [-Wconflicts-rr]
../../../dlls/msi/sql.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
warning: can't write value of type 12 yet
../../../dlls/vbscript/parser.y: warning: 10 shift/reduce conflicts [-Wconflicts-sr]
../../../dlls/vbscript/parser.y: warning: 10 shift/reduce conflicts [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
../../../programs/winedbg/dbg.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
../../../programs/winedbg/dbg.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
Install wine...
   install wine32...
   install wine64...
Congratulation! All are done. Enjoy!

After this, the installation succeeded. You may verify whether the files are 32-bit ones as follows.

Verify the installation results

You can check and verify the version of Wine.

$ wine --version
wine-5.0
$ cat /etc/redhat-release 
CentOS Linux release 8.1.1911 (Core) 

You can also verify the executable files are indeed 32-bit ones.

$ file `which wine`
/usr/local/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=7f7796ad7a52886e9fd45b8b655d9ef10d6ad4ab, with debug_info, not stripped
$ file `which wine64`
/usr/local/bin/wine64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=e9777dabcd55b06e39e94a60afa6c20f789cb742, with debug_info, not stripped

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

2 comments:

  1. amazing! can i install wine 64 beside this one? I want to launch steamcmd (32bit) then run a “Rust” (64bit) Server : )

Leave a Reply

Your email address will not be published. Required fields are marked *