This guide will teach you to Install Wine 32bit Wine 1.8 On Centos 7
Since version 7, RHEL has only x86-64 version. The same for CentOS 7. In CentOS 7/EPEL, there is only package for Wine x86-64. However, many Windows .exe files are 32bit. Even there are 64bit versions for some software, their installation file is 32bit. And for some certain software such as Office 2007, 32bit wine is preferred.

In this post, i will try to install Wine 32bit 1.8 on CentOS 7. I will use Wine 1.8.5 as the example.

Erase old wine versions installed

If you ever installed wine packages, erase them first as we will build wine from the source.

yum erase wine wine-*

Install packages needed to build wine

We are going to install the packages needed to build wine. These may not be sufficient depending on your base installation packages. If later steps complain that some packages are missing, you can install them.

yum install samba-winbind-clients -y 2>&1 >>$log
yum groupinstall 'Development Tools' -y 2>&1 >> $log
yum install libjpeg-turbo-devel libtiff-devel freetype-devel -y 2>&1 >> $log
yum install libgcc.i686 libX11-devel.i686 freetype-devel.i686 gnutls-devel.i686 libxml2-devel.i686 libjpeg-turbo-devel.i686 libpng-devel.i686 libXrender-devel.i686 -y 2>&1 >> $log

Download and unpack the source package

Here, we use a variable $ver to specify the version we want to install. It will be used in later steps too.

ver=1.8.5
cd /usr/src
wget http://dl.winehq.org/wine/source/1.8/wine-${ver}.tar.bz2 -O wine-${ver}.tar.bz2
tar xjf wine-${ver}.tar.bz2

Build wine 32bit and 64bit versions

Make directories for building wine 32bit and 64bit versions.

cd wine-${ver}/
mkdir -p wine32 wine64

Build the 64-bit version first as 32-bit version building depends on it.

cd wine64
../configure --enable-win64
make -j 4

Build the 32bit version now.

cd ../wine32
../configure --with-wine64=../wine64
make -j 4

Install wine 32bit and 64bit versions

Now, we can install Wine. The trick is to install 32-bit version first and then the 64-bit version.
As we are still in the win32 directory, run

make install

Install the 64-bit version:

cd ../wine64
make install

By now, if everything goes well, you have successfully installed the Wine 32-bit and 64-bit versions. You may double-check it with the file command:

$ file `which wine`
/usr/local/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=a83b9f0916e6c0d5427e2c38a172c93bd8023d98, not stripped
$ file `which wine64`
/usr/local/bin/wine64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4d8e8468402bc63bd2a72c59c57fcad332235d41, not stripped

Note the “ELF 32-bit” and “ELF 64-bit” in the file type strings.
Now you can run your 32-bit Windows application on CentOS 7. Enjoy 🙂

Installation Script

If you need Installation Script, you can copy paste code bellow or from Github

#!/bin/bash

# Download, build and install wine 32-bit on CentOS 7

# For details of this script, please check
# http://www.systutorials.com/239913/install-32-bit-wine-1-8-centos-7/

# Author: Eric Zhiqiang Ma (zma@ericzma.com)

set -o errexit

log=`mktemp -t install-wine.XXXXXX.log`

# Install

ver=1.8.4

echo "Hello there. Start to download, build and install wine $ver 32-bit and 64-bit versions..." | tee $log
echo "Logs are in $log" | tee -a $log

echo "Uninstall old wine64 if you have installed it. Please select yes..." | tee -a $log

yum erase wine wine-*

echo "Install wine building tools..." | tee -a $log

yum install samba-winbind-clients -y 2>&1 >>$log
yum groupinstall 'Development Tools' -y 2>&1 >> $log
yum install libjpeg-turbo-devel libtiff-devel freetype-devel -y 2>&1 >> $log
yum install libgcc.i686 libX11-devel.i686 freetype-devel.i686 gnutls-devel.i686 libxml2-devel.i686 libjpeg-turbo-devel.i686 libpng-devel.i686 libXrender-devel.i686 -y 2>&1 >> $log

echo "Download and unpack the wine source package..." 2>&1 | tee -a $log

cd /usr/src 2>&1 >> $log
wget http://dl.winehq.org/wine/source/1.8/wine-${ver}.tar.bz2 -O wine-${ver}.tar.bz2 2>&1 >> $log
tar xjf wine-${ver}.tar.bz2 2>&1 >> $log

echo "Build wine..." 2>&1 | tee -a $log
cd wine-${ver}/ 2>&1 >> $log
mkdir -p wine32 wine64 2>&1 >> $log

echo "   build wine64..." 2>&1 | tee -a $log
cd wine64 2>&1 >> $log
../configure --without-x --enable-win64 2>&1 >> $log
make -j 4 2>&1 >> $log

echo "   build wine32..." 2>&1 | tee -a $log
cd ../wine32 2>&1 >> $log
../configure --without-x --with-wine64=../wine64 2>&1 >> $log
make -j 4 2>&1 >> $log

echo "Install wine..." 2>&1 | tee -a $log
echo "   install wine32..." 2>&1 | tee -a $log
make install 2>&1 >> $log

echo "   install wine64..." 2>&1 | tee -a $log
cd ../wine64 2>&1 >> $log
make install 2>&1 >> $log

echo "Congratulation! All are done. Enjoy!" 2>&1 | tee -a $log
rm -f $log

# # Uninstall
cd /usr/src/wine-${ver}/wine32
make uninstall
cd /usr/src/wine-${ver}/wine64
make uninstall
Advertisements

Harris Marfel

Welcome to Harris Marfel (hrace009) Personal Blog. At this blog i only write what i like. If you don't like it, simple GTFO

Leave a Reply

Related Posts

Computer

[WordPress] Memperbaiki Error Sorry This File Type Is Not Permitted For Security Reasons

Jika website WordPress Anda mengalami error ketika mengupload file dengan pesan “Sorry, this file type is not permitted for security reasons”, tutorial kami kali ini dapat membantu Anda mengatasi masalah tersebut. Error tersebut merupakan salah Read more…

Computer

10 Best Free WordPress Gaming Themes 2017

Most of us have grown up playing video games. But the increasing fondness amongst adults for video games and online gaming, clearly hints that video games are not a kids domain any more. Many adults Read more…

Computer

Telkomsel terkena deface

Telkomsel adalah sebuah perusahaan telekomunikasi yang sangat besar di Indonesia, dan sekaligus menjadi layanan provider Internet yang jaringan nya sudah ada sekitar 90% di seluruh Indonesia. Namun sangat di sayangkan, mereka mematok harga yang sangat Read more…

%d bloggers like this: