With the increasing popularity of Linux desktops, There is another requirement occurred that we should have an application that can be used to run Windows applications. Windows has a long list of beautiful applications for users which are not available to Linux users. As we know that Linux does not support windows executables so WineHQ is a solution to run Windows applications and Linux systems.

Advertisement

The latest version of Wine 8.0 stable has been released on January 24, 2023. You can read about main highlights of this version from WINE announcement page. This article will help you to install Wine 8.0 stable release on RHEL-based systems by compiling it from the source code.

Step 1: Install Requierd Packages

Wine required many development packages. First, we recommend upgrading all system packages using the following commands.

yum clean all 
yum update 

Now install the required packages for Wine using the yum package manager using the following commands.

yum groupinstall 'Development Tools' 
yum install libX11-devel freetype-devel zlib-devel libxcb-devel \ 
      libxslt-devel libgcrypt-devel libxml2-devel gnutls-devel \
      libpng-devel libjpeg-turbo-devel libtiff-devel gstreamer-devel \ 
      dbus-devel fontconfig-devel 

Step 2: Installing Wine from Sources

RPM packages for wine are not available for the latest versions, So we need to download the wine source code. Use the below commands to download it.

wget https://dl.winehq.org/wine/source/8.0/wine-8.0.tar.xz 
tar -Jxf wine-8.0.tar.xz -C /tmp 
cd /tmp/wine-8.0 

Use the ./configure script to prepare the source for the installation based on the system hardware. This will create the Makefile for the compilation and set the installation environment for Wine according to your system.

## For 32-Bit Systems:
./configure 

## For 64-Bit Systems:
./configure  --enable-win64 

Finally, run the make and make install command to compile the wine source and install it on your system.

make 
make install 

Source code compilation will be some time to complete based on the system resources. Wait for the installation to complete successfully.

Step 3: Verify Installation

Use the following command to check the version of wine installed on your system

## On 32-Bit Systems:
wine --version 

## On 64-Bit Systems:
wine64 --version 

Step 3: Running Windows Application with Wine

To use wine we need to log in to the GUI desktop. After that Download a windows executable (.exe) file like PuTTY on your system and open it with Wine as below screenshot or use the following command.

wine ~/Downloads/putty.exe 

Share.

81 Comments

  1. Daniel Murguia on

    when i run ./configure i don’t get a Makefile file just a Makefile.in file and then when i run the make command i get the message “make: *** No targets specified and no makefile found. Stop.”

    plz help

  2. Hi there!

    This is really a nice site, – thanks Rahul. 🙂

    However, there exist now a somewhat easier install method from EPEL. And for all those who need also the 32bit Wine variant on latest CentOS 7.x check the harbottle REPO, https://gitlab.com/harbottle/wine32. Most recent version (for July 2019) is Wine 4.0.2.

    In short:

    # Install repos
    sudo yum -y install epel-release https://harbottle.gitlab.io/wine32/7/i386/wine32-release.rpm

    # Install Wine 64 bit and 32 bit
    sudo yum -y install wine wine.i686

    # Run Wine 64 bit, for example:
    wine64 cmd

    # Run Wine 32 bit, for example:
    wine32 cmd

  3. Hello sir,
    I sucessfully installed wine but while running wine putty.exe – it shows winr command not found. I am having centos 7 64 bit. What to do?
    Thanks

  4. hi
    I got these errors:

    winebuild: task.o is an empty file
    winegcc: ../../tools/winebuild/winebuild failed
    make[1]: *** [taskschd.dll.so] Error 2
    make[1]: Leaving directory ‘/usr/src/wine-1.7.45/dlls/taskschd’
    make: *** [dlls/taskschd] Error 2

    How can I fix this?

  5. Thank you so much for this article, but it seems like, i did something wrong

    root@localhost wine-1.7.42]# wine64 –version

    fixme:service:scmdatabase_autostart_services Auto-start service L”MountMgr” failed to start: 2
    wine: cannot find L”C:\windows\system32\2013version.exe”

  6. hello, I use RHEL 6.5, when I type ./configure –enable-win64, it will show as follows:
    configure: OpenCL development files not found, OpenCL won’t be supported.
    configure: OSS sound system found but too old (OSSv4 needed), OSS won’t be supported.

    After I make install and type wine64 putty.exe, it doesn’t work as follows:
    fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
    fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:wininet:set_cookie Unknown additional option L”Max-Age=315360000; Path=/”
    fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
    fixme:dwmapi:DwmIsCompositionEnabled 0x6d1e8a90
    fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x69e5e647, context 0x7a13b0, init_notify 0, handle 0x102e160): stub
    fixme:iphlpapi:CancelMibChangeNotify2 (handle (nil)): stub
    wine: configuration in ‘/root/.wine’ has been updated.

    Did you encounter this kind of bug? Thanks in advance.

  7. Hi Rahul,

    Thanks for this excellent article – I hope you will be able to help:
    – I have followed steps above methodically for OS Linux 6.6 64bit
    – Everything seems to be installed perfectly as I went through all the steps without any issues
    – However I could not run wine64 -version (single dash) or wine -version, wine64 –version returns wine-1.7.34
    – When I double clicked on .exe file nothing happens (including putty.exe)
    – I tried right clicked on “open with wine windows program loader” it is not doing anything too
    – I then tried command wine64 (as wine itself is not a recognisable command) start /Unix “$root/Desktop/putty.exe” it gives error “Application could not be started, or no application associated with the specified file. ShellExecuteEx failed: Internal error.”

    Can you please help?

    Thanks,

    Jed

    • Aaron Moffatt on

      I Jed, I tried doing that and I received these error messages over and over:

      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
      err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
      fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
      err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder

  8. Actually I wanted to run vlc and for that I need to install wine. After following steps, it is working successfully. Thanks for sharing with us.

  9. bzip2: (stdin) is not a bzip2 file.
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

    How do i go about this??

    • Hi Rohit,

      I have again checked and successfully extracted file. Might be your download was not completed properly. Please download archive file again.

  10. GNUTLS headers are being found although GNUTLS libraries are evading detection. They are located on my system in /usr/lib/x86_64-linux-gnu, and even with the LDFLAGS or GNUTLS_LIBS environment varible set to that directory, configure still fails to find the libraries.

    I am building with Debian Jessie on an AMD64 system.
    I have installed debian packages for:
    libgnutls-deb0-28
    libgnutls-openssl27
    libgnutlsxx28
    libgnutls28-dev

  11. Hi, I have a question: How long?… I mean, I’ve did it some hours ago, but it sill doing that:
    (insert a lot of code here LOL)
    ../../tools/winegcc/winegcc -o ieframe.dll.fake -B../../tools/winebuild -fasynchronous-unwind-tables -shared ieframe.spec
    classinfo.o client.o dochost.o events.o frame.o ie.o ieframe_main.o iehtmlwnd.o iexplore.o
    intshcut.o navigate.o oleobject.o persist.o shellbrowser.o shelluihelper.o urlhist.o view.o
    webbrowser.o ieframe.res ieframe_v1_t.res ieframe_v1_r.res -luuid -lurlmon -lshell32 -lcomctl32
    -lshlwapi -loleaut32 -lole32 -luser32 -lgdi32 -ladvapi32 -lwine ../../libs/port/libwine_port.a -lm

    make[1]: Leaving directory `/usr/src/wine-1.7.28/dlls/ieframe'
    config.status: creating dlls/ieframe/tests/Makefile
    make[1]: Entering directory `/usr/src/wine-1.7.28/dlls/ieframe/tests'
    gcc -c -o ie.o ie.c -I. -I../../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe
    -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
    -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith
    -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2
    gcc -c -o intshcut.o intshcut.c -I. -I../../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe
    -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
    -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith
    -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2
    gcc -c -o webbrowser.o webbrowser.c -I. -I../../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe
    -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
    -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith
    -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2" etc...

    Thanks =)

  12. Hi,

    I am beginner to linux, It shows an error message “not acceptable C compiler found in $PATH”.

    Pls suggest me.
    Thanks in advance

  13. Hello,
    the line *# ./configure –enable-win64*
    give me this answer : “configure: error: no suitable flex found. Please install the ‘flex’ package.”
    then, make and make install answer “makefile hasn’t been found”…
    thx you

    • Hi, U need to install “flex” by:
      sudo yum install flex

      and eventually another things you get noticed like: Please install the ‘……..’ .

  14. how to uninstall wine? I followed the steps on Centos 6.5 final 64bit but when i tried checking the version it says

    [root@superserver wine-1.7.23]# wine
    bash: wine: command not found

  15. Kamran Tayyab on

    Hey I get this error;

    configure: WARNING: prelink not found, base address of core dlls won’t be set correctly.

    configure: WARNING: libxrender development files not found, XRender won’t be supported.

    configure: WARNING: No OpenGL library found on this system.
    OpenGL and Direct3D won’t be supported.

    configure: WARNING: libxslt development files not found, xslt won’t be supported.

    configure: WARNING: libgnutls development files not found, no schannel support.

    configure: WARNING: libjpeg development files not found, JPEG won’t be supported.

    configure: WARNING: libpng development files not found, PNG won’t be supported.

    configure: WARNING: No sound system was found. Windows applications will be silent.

    Could you help me solve this? Thanks

  16. Hi, sir
    am new bea for redhat linux6…before installation wine package is neccessary to install any “Development tool” or libx11-devel*** package but i tried with yum install utility but it shown me “No Package available”…..where should i get these packages….please suggest me.

      • Aaron Moffatt on

        I don’t have wine in that forlder, but I have:

        – wine64
        – wine64-preloader
        – winebuild
        – winedump
        – wineg++
        – winegcc
        – wineserver

    • For 64 bit systems run wine64 –version

      [leo@omega wine-1.7.22]$ /usr/local/bin/wine64 –version
      wine-1.7.22
      [leo@omega wine-1.7.22]$ wine64 –version
      wine-1.7.22

      • Aaron Moffatt on

        When I run these commands, I get all these error messages over and over

        fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
        err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
        err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
        fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
        err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
        err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
        fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
        err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder
        err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
        fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
        err:menubuilder:convert_to_native_icon error 0x80004005 creating bitmap encoder

  17. According to the README file I need to run.

    ./tools/wineinstall

    But when I try, I get this:

    > The source directory is not writable. You probably extracted the sources as root.
    > You should remove the source tree and extract it again as a normal user.

    I don’t understand. This tutorial shows doing everything as root. What exactly is involved in
    “remove the source tree and extract it again” ?

    Shouldn’t I be able to just do a chown, and a chmod?

    When I try to run wine as root I get:

    > You are running wineinstall as root, this is not advisable. Please rerun as a user.
    > Aborting.

    Any advice?

  18. Does not work for me.

    Followed every step, everything seemed to work, but then I get this:

    [root@fir wine-1.7.19]# /usr/src/wine-1.7.19/wine –version
    wine: could not find the Wine loader in /usr/src/wine-1.7.19

  19. No work for me, i have centos 6.5 64 bit,
    my aplications open and close automatic
    i install all ok but dnt work
    need previus versions install to install this?

  20. root@michelsons on

    i m a beginner to RHEL i want to ask i have created yum server on my system using my DVD
    as soon as i input yum command for the group install it shows
    ‘Setting up Group Process
    Warning: Group Development tools does not exist.
    No packages in any requested group available to install or update’
    please solve my issue

  21. configure: error: X development files not found. Wine will be built
    without X support, which probably isn’t what you want. You will need
    to install development packages of Xlib/Xfree86 at the very least.
    Use the –without-x option if you really want this.

    when I’m trying to build on 64bit centos

  22. Thank you so much for this article! It’s the only one I’ve been able to find that works, after a long week of searching for answers! You should package this somehow and get CentOS to include it in their next build! (I’m new, so I don’t know if that’s possible, but if it is, you should!) Thank you!!!

  23. this does not work in 64bit Linux machines. when compiling. it gives a error unable to compile 32bit program. needs 32bit libraries.

    • Aaron Moffatt on

      Hey Amir, did you get it to work on yours? I haven’t been able to get it to work on my CentOS 6.6 64bit.

Exit mobile version