{"id":1281,"date":"2018-12-01T23:12:05","date_gmt":"2018-12-01T15:12:05","guid":{"rendered":"https:\/\/actom.me\/blog\/?p=1281"},"modified":"2018-12-01T23:12:05","modified_gmt":"2018-12-01T15:12:05","slug":"how-to-install-wine-32-bit-on-centos-7","status":"publish","type":"post","link":"https:\/\/actom.me\/blog\/how-to-install-wine-32-bit-on-centos-7.html","title":{"rendered":"How to Install Wine 32-bit on CentOS 7"},"content":{"rendered":"\n<p>Since version 7, RHEL has only x86-64 versions. The same thing \nhappens to CentOS 7. In CentOS 7\/EPEL, there is only package for Wine \nx86-64. However, many Windows .exe files are 32-bit. Even there are \n64-bit versions for some <a href=\"https:\/\/www.systutorials.com\/category\/tutorial\/software\/\">software<\/a>, their installation file is 32-bit. And for some certain software such as <a href=\"https:\/\/www.systutorials.com\/3719\/installing-ms-office-2007-on-linux-using-wine\/\">Office 2007<\/a>, 32-bit wine is preferred.<\/p>\n\n\n\n<p>In this post, we will check how to install 32-bit Wine on CentOS 7.<\/p>\n\n\n\n<ul><li>It is confirmed that this method works for Scientific <a href=\"https:\/\/www.systutorials.com\/category\/tutorial\/linux\/\">Linux<\/a> 7.2 too by <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#comment-143165\">Steve<\/a>.<\/li><li>It is confirmed that this method works for Wine 2.0 too by <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#comment-156005\">Victor Schulz<\/a> and <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#comment-157977\">gretzware<\/a>.<\/li><li>It is confirmed that this method works for 2.17 development too by <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#comment-158134\">gretzware<\/a>. Note it needs libXfixes-devel .<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/wine-2-0-2-32-bit-centos-7\/\"><img decoding=\"async\" src=\"https:\/\/www.systutorials.com\/wp\/files\/2016\/10\/wine-2.0.2-32-bit-centos-7.png\" alt=\"\" class=\"wp-image-240596\"\/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"one-single-script-to-build-and-install-wine\">One single script to build and install Wine <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#one-single-script-to-build-and-install-wine\">\u221e<\/a><\/h2>\n\n\n\n<p>The whole process in this post has already been written <strong>as a shell script <a href=\"https:\/\/www.systutorials.com\/go\/install-wine-1.8\/\">install-wine-i686-centos7.sh<\/a><\/strong>. You may download the script and run it directly as root to install wine of version  such as 1.8.7, 2.0.2. Default  is 1.8.7.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># install-wine-i686-centos7.sh [&lt;version&gt;]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"build-and-install-wine-manually-step-by-step\">Build and install Wine manually step by step <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#build-and-install-wine-manually-step-by-step\">\u221e<\/a><\/h2>\n\n\n\n<p>The following part of this post introduces what each step does.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"erase-old-wine-versions-installed\">Erase old wine versions installed <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#erase-old-wine-versions-installed\">\u221e<\/a><\/h3>\n\n\n\n<p>If you ever installed wine packages, erase them first as we will build wine from the source.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum erase wine wine-*<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-packages-needed-to-build-wine\">Install packages needed to build wine <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#install-packages-needed-to-build-wine\">\u221e<\/a><\/h3>\n\n\n\n<p>We\n are going to install the packages needed to build wine. These may not \nbe sufficient depending on your base installation packages. If later \nsteps complain that some packages are missing, you can install them.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install samba-winbind-clients -y\nyum groupinstall 'Development Tools' -y\nyum install libjpeg-turbo-devel libtiff-devel freetype-devel -y\nyum install glibc-devel.{i686,x86_64} libgcc.{i686,x86_64} libX11-devel.{i686,x86_64} freetype-devel.{i686,x86_64} gnutls-devel.{i686,x86_64} libxml2-devel.{i686,x86_64} libjpeg-turbo-devel.{i686,x86_64} libpng-devel.{i686,x86_64} libXrender-devel.{i686,x86_64} alsa-lib-devel.{i686,x86_64} -y \n\n# ... and more ...\n# Check the `install-wine-i686-centos7.sh` script for more packages needed.<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"download-and-unpack-the-source-package\">Download and unpack the source package <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#download-and-unpack-the-source-package\">\u221e<\/a><\/h3>\n\n\n\n<p>Here, we use a variable <code>$ver<\/code> to specify the version we want to install. It will be used in later steps too.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ver=2.0.2 # We will use this as the example. \nvermajor=$(echo ${ver} | cut -d'.' -f1)\nverurlstr=$(echo ${ver} | cut -d'.' -f1,2)\n\ncd \/usr\/src\nif [[ \"${vermajor}\" == \"1\" ]]; then\n  wget http:\/\/dl.winehq.org\/wine\/source\/${verurlstr}\/wine-${ver}.tar.bz2 -O wine-${ver}.tar.bz2\n  tar xjf wine-${ver}.tar.bz2\nelif [[ \"${vermajor}\" == \"2\" ]]; then\n  wget http:\/\/dl.winehq.org\/wine\/source\/${verurlstr}\/wine-${ver}.tar.xz -O wine-${ver}.tar.xz\n  tar xf wine-${ver}.tar.xz\nfi<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"build-wine-32-bit-and-64-bit-versions\">Build wine 32-bit and 64-bit versions <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#build-wine-32-bit-and-64-bit-versions\">\u221e<\/a><\/h3>\n\n\n\n<p>Make directories for building wine 32-bit and 64-bit versions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd wine-${ver}\/\nmkdir -p wine32 wine64<\/pre>\n\n\n\n<p>Build the 64-bit version first as 32-bit version building depends on it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd wine64\n..\/configure --enable-win64\nmake -j 4<\/pre>\n\n\n\n<p>Build the 32-bit version now.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ..\/wine32\nPKG_CONFIG_PATH=\/usr\/lib\/pkgconfig ..\/configure --with-wine64=..\/wine64\nmake -j 4<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-wine-32-bit-and-64-bit-versions\">Install wine 32-bit and 64-bit versions <a href=\"https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/#install-wine-32-bit-and-64-bit-versions\">\u221e<\/a><\/h3>\n\n\n\n<p>Now, we can install Wine. The trick is to install 32-bit version first and then the 64-bit version.<\/p>\n\n\n\n<p>As we are still in the <a href=\"https:\/\/www.systutorials.com\/tag\/win32\/\">win32<\/a> directory, run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">make install<\/pre>\n\n\n\n<p>Install the 64-bit version:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ..\/wine64\nmake install<\/pre>\n\n\n\n<p>By now, if everything goes well, you have \nsuccessfully installed the Wine 32-bit and 64-bit versions. You may \ndouble-check it with the <a href=\"https:\/\/www.systutorials.com\/docs\/linux\/man\/1-file\/\"><code>file<\/code><\/a> command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ file `which wine`\n\/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\n$ file `which wine64`\n\/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<\/pre>\n\n\n\n<p>Note the \u201cELF 32-bit\u201d and \u201cELF 64-bit\u201d in the file type strings.<\/p>\n\n\n\n<p>Now you can run your 32-bit Windows application on CentOS 7. Enjoy \ud83d\ude42<\/p>\n\n\n\n<p>From: https:\/\/www.systutorials.com\/239913\/install-32-bit-wine-1-8-centos-7\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since version 7, RHEL has only x86-64 ve &#8230; <a class=\"more-link\" href=\"https:\/\/actom.me\/blog\/how-to-install-wine-32-bit-on-centos-7.html\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1281"}],"collection":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/comments?post=1281"}],"version-history":[{"count":1,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1281\/revisions"}],"predecessor-version":[{"id":1283,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/posts\/1281\/revisions\/1283"}],"wp:attachment":[{"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/media?parent=1281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/categories?post=1281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actom.me\/blog\/wp-json\/wp\/v2\/tags?post=1281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}