Pages

03 January 2012

38. How to install and/or compile wine on debian testing


UPDATE: See here for Wine 1.5.27 using a chroot
http://verahill.blogspot.com.au/2013/04/376-wine-1527-on-debian-i386-chroot.html


UPDATE: there are plenty of more up-to-date guides on this blog. See e.g. here for how to build v 1.5.6. Obviously, the instructions below are still valid, and will give you a working version of wine.


Original post:
Quite some time ago Wine was removed from Debian Testing/Wheezy. If you already had wine installed, this may not have caused any significant problems, but it did cause inconvenience when setting up a new computer.

There are three fairly easy ways of installing wine in Debian testing.

Update: See here for version 1.4-rc4: http://verahill.blogspot.com.au/2012/02/debian-testing-wheezy-64-compiling-wine.html

1. The simplest approach -- Using the Stable version of wine 
Simply add the stable repo to your /etc/apt/sources. list (add -- don't replace your testing repo)

i.e. if you sources.list looks like this:

deb ftp://ftp.au.debian.org/debian/ testing main contrib non-free


then add a line so that it looks like this:
deb ftp://ftp.au.debian.org/debian/ testing main contrib non-free
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free

Running

sudo apt-get update

followed by

aptitude search wine

should hopefully show wine, wine-bin etc. The current version in the Debian stable repos is 1.0.1-3.1.

You can now install wine by

sudo apt-get install wine


2. The ever so slightly more complex approach -- installing version 1.3.32-0.1
If you want a newer version -- and I'd say that you would since the debian wine packages are OLD -- you can at the moment pull .deb packages from http://dev.carbon-project.org/debian/wine-unstable/

Don't let the 'unstable' fool you -- these are NOT the packages in the debian SID/unstable repos.

Also, pay heed to the following text on the page above: "The amount of traffic this little sub-page generates is quite respectable. If you think this service helpful and want to help cover some of the attached costs, please donate a few Euros". Whether you donate or not, do not download the same packages over and over again.

Download all the .deb files (in my case for amd64) using the following command:

wget -r -l1 --no-parent -A amd64.deb http://dev.carbon-project.org/debian/wine-unstable/

This is an example of using something akin to wildcards in wget.

cd dev.carbon-project.org/debian/wine-unstable

sudo dpkg -i *.deb

You'll see a number of errors being reported and the packages will be left unconfigured -- this is due to missing dependencies. That's easy to fix though:

sudo apt-get -f install

The missing dependencies will now be pulled in and the installation finalised. It's as easy as that!

3. Building your own -- version 1.3.35
It's not as hard as it may look -- I'm not in the habit of compiling my own packages, and chances are that you aren't either, so I'll show the entire process.

Download the source
wget http://prdownloads.sourceforge.net/wine/wine-1.3.35.tar.bz2

Unpack:
tar -xvf wine-1.3.35.tar.bz2

You may have to
sudo apt-get install bzip2 
before running the tar command above if it complains about missing bzip2 etc.

Change to the directory where the files were unzipped
cd wine-1.3.35

Time to start trying to build -- the errors I get may not be the errors you get. The approach to solving them is the same though.

First we need a whole lot of packages:

sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev

sudo apt-get install lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev

Now start:
./configure

which gives**


configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.

configure: Finished.  Do 'make' to compile Wine.




Good enough for me. 

make

Building will take a good 20-30 minutes.

Finally, 'install' the binaries in their proper locations

sudo make install

The first time you start a program in wine you'll be asked to install the gecko engine, which you can go ahead and do.

** I initially had some problems -- one of them being


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

This was solved by installing ia32-libs-dev



7 comments:

  1. Everyone suffers from making the odd silly mistake at times -- this may thus be relevant for some:
    http://forums.linuxmint.com/viewtopic.php?f=190&t=93157

    ReplyDelete
    Replies
    1. Are you mocking me, sir? ;)
      Thank you for the guide

      Delete
    2. Less mocking and more stroking my own ego by posting links proving that someone somewhere is reading and using the instructions that I post :)
      Anyway, I'm glad that you found the instructions useful.

      Delete
  2. I used them.. Thank you!

    ReplyDelete
  3. hello... i've try your tutorial, the 1.3.35, i get the error "unable to locate package blablabla" on this command:
    sudo apt-get install bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev

    and

    sudo apt-get install lib32v4l-dev lib32ncurses5-dev lib32asound2-dev lib32z-dev ia32-libs-dev
    -------------------------
    Is it okay with those errors?
    please reply to aldisatriani@hotmail.com

    ReplyDelete
    Replies
    1. Depends on what the errors were -- it's the blablabla which is important here. Anyway, most likely there's a problem when you're doing copy/paste and a space is turned into two, or even a tab. Try installing the packages one by one, or look at what packages aren't being located -- they will be in the repos, it's just apt-get that's being stubborn.

      Delete
  4. Thank you for this post. It was very helpful to me :)

    ReplyDelete