How to Install Wine on Debian 7 Wheezy

By | August 12, 2020


Wine is a free implementation of the Microsoft Windows API for the linux platform and it is used to run windows applications on linux.

However it has limitations and cannot run all applications.

Wine is included in the base repositories of distros like Ubuntu and Debian, so can be installed easily from apt.

Search for wine in your package cache using the aptitude command.

We are doing it on a 64bit debian system.

$ aptitude search ^wine
i   wine                                  - Windows API implementation - standard suite   
p   wine-doc                              - Windows API implementation - documentation       
i A wine64-bin                            - Windows API implementation - binary loader       
p   winetricks                            - package manager for WINE to install software easily

Good, we found wine. Now install it right away.

# apt-get install wine

After the installation completes, run wine from the command line

# wine

It would popup a dialog box saying the following

This is the wine64-bin helper package, which does not provide wine itself,
but instead exists solely to provide the following information about
enabling multiarch on your system in order to be able to install and run
the 32-bit wine packages.

The following commands should be issued as root or via sudo in order to
enable multiarch (the last command installs 32-bit wine):

  # dpkg --add-architecture i386
  # apt-get update
  # apt-get install wine-bin:i386

Be very careful as spaces matter above.  Note that this package
(wine64-bin) will be removed in the process.  For more information on
the multiarch conversion, see:

The output is telling us, that we need to enable the i386 packages on Debian to be able to install wine. So now following the instructions showed in that dialog. Run the commands in exact sequence

# dpkg --add-architecture i386
# apt-get update

Install i386 (32bit) Wine packages

Now if you search wine, it will show the additional 32bit packages

# aptitude search ^wine
i   wine                            - Windows API implementation - standard suit
p   wine:i386                       - Windows API implementation - standard suit
v   wine-bin                        -                                           
p   wine-bin:i386                   - Windows API implementation - binary loader
p   wine-doc                        - Windows API implementation - documentation
i A wine64-bin                      - Windows API implementation - binary loader

Now go ahead and install wine:i386 package.

# apt-get install wine:i386

It will download around 90MB, depending on what packages are already installed on your debian system.
After installation run again to confirm that its installed properly

# wine --version

As we can see, we just installed wine 1.4.1 Now in the application menu, somewhere you would find a Wine Configuration option. Click it and a window like this should popup.

wine on debian

Run Notepad on Wine

Now you can run the windows notepad application from wine. Just execute the command notepad from the terminal.

# notepad

Install winetricks on debian

Winetricks is a gui script that can be used to install some windows applications on linux to be used with wine. It needs the zenity library to run. The zenity library allows to create gtk based gui dialogs from the command line or bash scripts.

It might not be installed on debian by default, depending on what desktop system you are using. So first install zenity.

# apt-get install zenity

Now download winetricks script

$ wget

And make it executable with chmod

$ chmod +x winetricks

Now run winetricks

$ ./winetricks

It will popup a dialog box with instructions. Follow the instructions and install the application you like.

Winetricks can also be used from the commandline

$ ./winetricks apps list

The above command will list all the applications available. Follow this tutorial for more instructions on how to use winetricks from the commandline.

Install latest version of Wine

We saw above that the debian repositories provide an outdated version of wine. The latest version can be installed from the wine website.

Download latest Wine

To install the latest version of wine download the deb packages from the following url

Download the correct packages from the amd64 or x86 category depending on your system architecture.

Next we shall install gdebi which can be used to install the deb packages. The dpkg command can also be used to install the deb packages, but it does not install the dependencies automatically. gdebi does this.

# apt-get install gdebi

Now, we shall use gdebi to install all the deb files downloaded in the previous step. However first we need to install a few additional packages.

# aptitude install libc6-dev-i386 oss-compat lib32z1 
# aptitude install libc6-i386
# aptitude install ia32-libs

Now install wine debs.

# gdebi libwine-*
# gdebi wine-*

So now wine should be installed properly. Check the version to confirm

# wine --version

Note that if you installed wine from debian repositories previously, then you need to remove it first.

# aptitude remove libwine-bin:i386

Now launch the wine configuration window like before. It would prompt you to download gecko. Click OK to download gecko. This is used to render webpages in the applications.

Next, when launching wine applications it would show a message like this

It appears that libnss-mdns is installed on your system,
but lib32nss-mdns is not. Please note that Wine will not be
able to access the Internet unless you either install
lib32nss-mdns (or ia32-libnss-mdns), or uninstall libnss-mdns.

Fix this by installing the necessary packages.

# aptitude install lib32nss-mdns

Now wine applications should start without any notice or messages.

After doing all the above, if you encounter dependency errors, then try using the following command

# apt-get install -f

It installs the necessary packages from broken packages and attempts to fix broken dependency errors.
Now you should have wine installed properly on your Debian machine.

If you have any feedback or questions, let us know in the comments below.

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].


How to Install Wine on Debian 7 Wheezy
  1. Pedhipicuss Suka Fredytama

    I got this message :
    ” The following packages have unmet dependencies:
    wine:i386 : Depends: wine-bin:i386 (>= 1.4.1-4) but it is not going to be installed or
    wine64-bin:i386 (>= 1.4.1-4) but it is not installable
    E: Unable to correct problems, you have held broken packages.”

    while run # apt-get install wine:i386
    how do i fix this?

  2. thickhead

    Dependency is not satisfiable: libwine-unstable (= 1.7.11-0.1)
    is the error i am getting when trying to upgrade to 1.5.5 version.. all went smooth up to the stage of gdebi

    libwine-*, tried both the i386 and amd64 packages. running debian wheezy 7.2 amd64.

  3. Simon Lukes

    Thank you for a really useful tutorial. I wondered what was going on with Wine on Debian Wheezy, where it is apparently installed but not working. Someone on another forum which I googled referred to Wine being “a ghost on my system” on their Debian installation and there I got stuck. Now it’s working thanks to you.

  4. Barichello_Brazil

    How to fix?

    root@Barik:/home/barichello/Downloads/Programas/wine-unstable# winecfg
    p11-kit: couldn’t load module: /usr/lib/i386-linux-gnu/pkcs11/ /usr/lib/i386-linux-gnu/pkcs11/ cannot open shared object file: Arquivo ou diretório não encontrado

    Its tutorials are very good. Thanks.

Leave a Reply

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