Wine, a cruel mistress – updating Debian’s ancient wine

Wine can indeed be a cruel mistress; the morning after the night before, after the sudo apt-get install has faded away and left you nothing but a jiggered system that won’t even run notepad.

I speak of course not of the mighty grape and what she gives us, but of wine (Wine Is Not an Emulator), the Win32 translation layer for Unix/Linux that does an excellent job of allowing Windows programs to run natively on Linux, often at great speed and without problems.

And sometimes with problems. If you run Ubuntu or Fedora, you’ll be blessed with recent updates from the 1.3 beta versions of wine, while the official stable version has languished at 1.2 for what seems like an eon. If you use Debian, then apt-get will only provide you with the even more Jurassic 1.0.3 version from the current stable (squeeze) repositories, there’s nothing in debian-backports, and even the upcoming releases in testing (wheezy) and unstable (sid) are only minor 1.x version bumps. You can do a full search of Debian distribution package list to see the tale of woe.

The reasoning behind Debian’s exceptionally cautious nature and glacial pace of rolling out updates is well known and well founded, and wine is hardly a core package. But that doesn’t help in the slightest when you really, simply, absolutely have to install and run Deathspank right now, and older versions aren’t cutting it.

Naturally, there are ways and means. Linux is more complex; but with complexity comes flexibility.

There are a couple of options for Debian users that offer a relatively pain-free way of using updated wine binaries and libraries without the risk of doing something terrible to the system.


Debian, winehq-approved packages

Debian packages created from the latest wine builds by Kai Wasserbäch can be found on his page at These are the latest builds, currently 1.3.33 for i386 or amd64 architectures, released today, and officially sanctioned by winehq.

Rather than setting up an apt repository (as he points out, “I don’t want to encourage people to install binary packages from third parties without thinking about what they’re doing”), the individual files are listed for download. You could just click each one, but it’s nice to get the computer to do the work for us. While wget won’t accept wildcards when downloading using http, so we can’t use a regexp like *wine*[your_arch_here], we can use a different method.

First highlight and copy the text list of packages from the webpage for whichever architecture you need and paste it into a text file. Using gedit or vi will neatly remove the bullet points leaving one package name per line, just as we want it. Name the file something memorable and recognisable, such as say, zig. Then type into a shell:

# wget --base= --input-file=zig -P libwine

This gives wget the base URL to work from, the list of files to download, and –P tells it create or use the directory libwine to store the files. Add the full path to zig if required, and you can substitute -B for --base and --i for --input-file.

Once you have a neat directory of .deb packages, you have to install them. apt-get is for querying and installing packages from the main Debian repositories (or other repositories you have added to /etc/apt/sources.list). For manual installation use dpkg, which usefully can be pointed at a directory and told to get on with installing a bunch of files at once:

# dpkg -R -i libwine/
# dpkg -i libwine/*

achieve much the same, where -i selects for install and -R tells dpkg that -i refers to a directory, not a file, which is why in the second example the asterisk wildcard (*) is needed to refer to ‘all files’.

But dpkg doesn’t provide hands-free dependency handling like apt-get, so it may be that some of the wine packages will fail to install due to unmet dependencies or version clashes. It’s easy enough to work out what it wants from the output given on screen, search the Debian package list for the updated version, download and use dpkg to install as before – but if you’re unlucky, that process that could potentially continue ad infinitum, ad nauseam. For what it’s worth, running Debian squeeze I needed only two: lib32ncurses5_5.9-4 and lib32tinfo5_5.9-4, both available from the testing repository (change the distribution drop down box to ‘any’, and search). It’s worth using the --no-act switch while using apt-get and dpkg
to dry-run without installing, giving you not only a chance to review what is happening but also precise details of what file version is being pulled from which repo.


Ubuntu Wine Team PPA packages

So far so easy. It’s certainly preferable to use packages built for the version of Debian you’re using, or at least a version of Debian, but if that doesn’t bring the results hoped for there’s always Ubuntu to turn to. With a large installed user base, more resources and a quicker release schedule than the Debian team, Ubuntu packages are mostly interoperable and tend to be packaged with the less-expert user in mind. For example, the Debian packages above weighed in at 59 Mb, while apt-get install issued at the Ubuntu wine PPA tried to pull in over 200 Mb of dependencies and support packages to make sure things work smoothly, including the very useful winetricks. Too much, I hear you say? Well it (wine 1.3.26) worked for me while the Debian packages (wine 1.3.33) didn’t, so the proof is in the pudding.

I’ve explained how to use Ubuntu Launchpad PPA repositories with Debian here, and the same applies. Briefly:

1.    Go to the Ubuntu wine PPA archive.

2.    Click on the green ‘Technical details’ tab, select an Ubuntu version and copy/paste the deb and deb-src lines into your /etc/apt/sources.list file. I’ve used the last long term support version, Lucid.

3.    Copy the GPG key (the part after the 1024R/) and add it using apt-key, then use apt-get update and apt-get install wine1.2 or apt-get install wine1.3 to install wine, depending on how wild, up-to-date and un-Debian you’re feeling.

Finally, run winecfg to prompt wine to autoconfigure, use the GUI to make any further changes and then see what works, using winetricks to install Microsoft packages such as msxml3, msxml4, msvc60, gdiplus, etc. if needed. There’s a lot of information on what works and what doesn’t, tips and tricks at

Note: it’s worth mentioning that there is another repository of updated Debian packages including wine at, which appear to be different builds of equally up-to-date versions. And another is the Mepis Linux distribution, based on Ubuntu/Debian, for which repos can be found at You’re mileage may vary as I’ve not tried either of them.


  1. cretox wrote:

    $ elinks -dump | grep -e “[0-9]\. .*amd64\.deb” | sed ‘s/^ *[0-9]*\. *//g’ > list.txt
    $ wget -i list.txt

  2. michael wrote:

    Nice. But I think we can agree that links is not most people’s first choice of browser.

Leave a Reply