Installing WINE 1.5.1 in Ubuntu 32bit and 64bit

According to a TON of websites the new version (1.5.0 and greater) of WINE fixes the install of Apple iTunes 10.x

Before we get to the WINE 1.5.1 installation, let me explain … iTunes 10.6 definitely installed, and ran, it also has no problem as a player, but seemed unable to access the iTunes Store (or do any other “online” activity) … this may be fixable, but (FOR NOW) is beyond the scope of this tutorial … I may add something later if I manage to get the “online” side if it working

I also must add that I haven’t tested iTunes with an iPod, iPad, or iPhone … quite simply I don’t own one, and have no intention of changing that :wink:

For now this is SOLELY a tutorial about installing WINE 1.5.1 … with a few hints that may help with iTunes at the end.

These instructions should work for pretty much any recent version of Ubuntu … I’ve tested it on 11.10 64bit, but it should work on earlier versions and 32bit architecture … It should also work in PeppermintOS (Two), but for those that have followed my tutorial for installing PeppermintOS on an Acer Aspire One with an 8GB SSD, it’s probably best not to bother, the build dependencies alone will probably use too much space on your SSD … if however you have plenty of room, a larger SSD, or a HDD then feel free :slight_smile:

OK, we will be adding a PPA (so we can get the build dependencies for the latest version of WINE), installing some required packages, installing the build dependencies, downloading the WINE 1.5.1 source code, then compiling and installing.

The first thing you’ll want to do is REMOVE any earlier versions of wine and wine-gecko … best place to do this is in your package manager.
(if you don’t know how … ask)

Add the ppa:ubuntu-wine/ppa PPA so that we can pull in the build dependencies for the latest version (wine1.3 … which FYI will actually be wine1.4 after adding the PPA, but it will still be called" as wine1.3):

sudo add-apt-repository ppa:ubuntu-wine/ppa

then update the package cache:

sudo apt-get update

Install some required packages:

sudo apt-get install linux-headers-generic build-essential flex bison qt3-dev-tools qt4-qmake

Pull in the build dependencies (I know it says wine1.3, but that doesn’t matter at this point):

sudo apt-get build-dep wine1.3

Download the WINE 1.5.1 source code to your Home directory:

cd ~



Unpack the archive you just downloaded:

tar -xjvf wine-1.5.1.tar.bz2

Change directory to the wine-1.5.1 directory:

cd wine-1.5.1

Run configure:


and wait till it finishes and leaves you back at an $ prompt … (info - just above the $ prompt it should now be telling you to run “make”)

Run make:


At this point, go lie down for a bit, or go to the pub as it will take about an hour to compile

When it eventually finishes compiling and leaves you back at an $ prompt …

Install it with:

sudo make install

Once installed, run


to configure it.

Now you can check you have version 1.5.1 by running

wine --version

OK that’s it … you should now be running WINE 1.5.1 :slight_smile:

See below for a couple of hints

If uninstalling an earlier version of wine also removed winetricks … DO NOT reinstall it through your package managers (that will also reinstall the earlier version of wine) … instead install it like this:-

cd ~




chmod +x winetricks 

You’ll then find it in your home folder … run it from there.

If you’re intent on trying iTunes before I’ve worked it out … one thing I HAVE discovered is that after you install iTunes and attempt to run it in WINE, you will get a warning that the ODBC versions don’t match … the fix is to use winetricks to install mdac28

The WineHQ pages about installing iTunes suggest when you run winecfg you set the system to Windows 7 not XP

And when launching iTunes you will get a message about it not being able to read or write to the CD drive … but this doesn’t stop it from launching.

As I said, ATM this is NOT a tutorial for getting iTunes working in WINE 1.5.1 … that may come later :slight_smile:

Can I ask that if anyone DOES get iTunes working before I get round to trying … could you please post how you did it … thanks in advance.

When I entered sudo apt-get build-dep wine1.3, I got:
john@JohnDesktop:~$ sudo apt-get build-dep wine1.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to find a source package for wine1.3

Help please!

Which version of Ubutnu are you running, and which architecture. ?

If you’re not sure, send the output from:

cat /etc/*-release


uname -a

I should have stated them on my post. I’m using a clean install of Ubuntu Desktop Lucid 64 bit.

That’'s odd … If you have an active internet connection, and added that PPA, wine1.3 should be available, as it’s in that PPA:

Check you have the “Universe” and “Multiverse” repositories enabled … this can be done by starting the synaptic package manager, then going to Settings>Repositories … now on the first tab, tick all the boxes (except the one for cdrom: if present) … click “Close”

Now Close Synaptic, and open a terminal and run:

sudo apt-get update && sudo apt-get upgrade

When that’s done … try that command again and let me know what happens.

Check you have the “universe” repositories enabled … this cann be done by starting the synaptic package manager

There’s a typo in your command Mark.

Should read

sudo apt-get update && sudo apt-get upgrade


Thanks … fixed in original posting :slight_smile:


Universe & Multiverse already enabled. Searching for wine with Origin selected in Synaptic shows that wine1.3 (with version shown as 1.4) is installed. Tried the sudo apt-get build-dep wine1.3 again and it told me that ‘Unable to lock admin’. So I closed Synaptic. Tried sudo apt-get build-dep wine1.3 again and it did the same as before. So I thought I’d try unchecking the ‘-’ against Source code entry. That gave me:
john@JohnDesktop:~$ sudo apt-get build-dep wine1.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_main_source_Sources - open (2: No such file or directory)
Thus, things even worse!

Checked the ‘-’ against Source code entry. Then did sudo apt-get update && sudo apt-get upgrade and things back to normal i.e. getting:
john@JohnDesktop:~$ sudo apt-get build-dep wine1.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to find a source package for wine1.3

I think that the reason for the problem is that the wine ppa contents were modified on 16 March 2012. More specifically I do not know.

OK, try purging that PPA, which will undo any changes made by the PPA, and disable it:

sudo apt-get install ppa-purge


sudo ppa-purge ppa:ubuntu-wine/ppa

Then update the package cache:

sudo apt-get update

Run a system update:

sudo apt-get upgrade

Now have a look in Synaptic to see if there is a wine1.3 package … if there is, again try:

sudo apt-get build-dep wine1.3


Done as instructed. “sudo apt-get build-dep wine1.3” gave the usual “E: Unable to find a source package for wine1.3”. However, even though wine ppa purge worked, as did other instructions, wine 1.3 package is still showing installed version as 1.4 on Synaptic: checked it with Software Sources & ppa giving wine repository is no longer checked.

No reply from Scott Ritchie re the wine ppa contents possibly having an error.

PS it’s a little bit irritating that this forum does not automatically result in getting an email alert when a post is made on a ‘contribut’ topic (i.e. without using Notify each time) or am I missing something?

You had notifications set to only email you when this topic was “moderated” notto email you when there was an unread reply … I’ve fixed that for you (hopefully).

I’ll load 10.04 into a VM and see if I can replicate the missing source package then get back to you.


I got sudo apt-get build-dep wine1.3 to download & install 240MB of packages by adding the deb-src Index of /ubuntu-wine/ppa/ubuntu lucid main repository (by sudo gedit /etc/apt/sources.list.d/ubuntu-wine-ppa-lucid.list, as adding the repo using Software Sources & +Add… button did not enable the +Add Source… button!).

Rest of instructions worked (it did ask about downloading an appropriate version of wine-gecko, to which I assented & it did that OK). winetricks was not removed & is showing as version 0.0+20120308~ppa1: so I guess that that is latest (i.e. wine 5.1 does not incorporate a later version: I always get the feeling that wine & winetricks do not have any dev in common). winecfg About menu item & wine --version show wine as version 5.1. Interestingly Synaptic does not show wine 1.5.1: why is this?

Now on to see if Basic4android will work properly under Wine 1.5.1 - it being the reason why I wanted to install Wine 1.5.1.

A bit odd that … but glad to hear you got it installed … and thanks for the update :slight_smile:

Synaptic won’t list it because Synaptic is a package manager … WINE 1.5.1 wasn’t installed as a package (.deb), it was compiled, so Synaptic is unaware of its existence on the system.


I’d forgotten about compiling an app (Wine in this case) leads to it not showing up in Synaptic as that only shows packages (i.e. installed from repos & downloaded .debs). I actually had a major problem with Gambas because Gambas’ author (Benoit Misasini - hopefully got spelling right) asked me to check if a bug had been cleared on his dev version (i.e. source available on Subversion: downloaded & compiled by me) before a .deb had been created. If I remember correctly, this lead to Gambas being installed on /usr/local (rather than /usr where a .deb ‘installs’ to): this caused strange runtime results. I had to uninstall the compiled version. As a result, kendek (credit to him) now has a Gambas Pre-release ppa on Launchpad containing the latest Gambas version (he updates it approx weekly).

PS Basic4android still didn’t behave using Wine 1.5.1. This is bug 30085 in Wine: my guess is that it’s caused by Wine’s usage of .Net2.0 (incl Sp1 & SP2). have you had experience of .Net2 using Wine?

Firstly, great tutorial. Very clear, especially for someone new to compiling applications from source. I’m running into a slight issue.

On the step where you says to check the version with “wine --version”, I get the error “bash: /usr/bin/wine: No such file or directory”. Since winecfg worked, I ran “which winecfg” to see where it was. Both wine and winecfg are in /usr/local/bin/, not /usr/bin/.

Is there a way to make it so that the command “wine” points to that location? Or should I create a symlink to the file in /usr/bin/?

my guess is that it's caused by Wine's usage of .Net2.0 (incl Sp1 & SP2). have you had experience of .Net2 using Wine?

Other than to say the last time I tried I couldn’t get .net working … not really, sorry.

Even though WINE is a very worthy project, I come from the “run things in their native OS” school of thought, and if there isn’t a native Linux version I tend not to bother with the application.

I only wrote the WINE 1.5.1 tutorial because I know there are a lot of people wanting iTunes, and I’d spotted that it was supposed to work in WINE >= 1.5.0 … so I thought it may come in handy for someone :slight_smile: … not me though, I’ll never own anything Apple :wink:

The only thing I run in WINE is ImgBurn … just because I’m used to its interface … so I’m afraid I’m probably not the best person to ask for help with configuring Windows applications in WINE :-[

IiRC, WINE’s intergration of .NET isn’t very good. I’ve tried running a few apps that use .NET and none of them worked for me. So it’s more of the “your best looking for a native app” thing.

Hi Koviko and welcome to the forum :slight_smile:

I can’t say I had that problem, wine --version worked for me, but I’m currently not sat at the PC I installed WINE 1.5.1 onto, when I am I’ll check where it got installed, and my $PATH configuration., and post them back here.

But yeh, try a symlink … It can’t hurt to try :slight_smile:

Which version of Ubuntu are you running, and which architecture ?

Thanks Mark and BkS. This Basic4android is a great app for dev Android apps, particularly as I have no intention of learning Java as IMO it’s horrible. Unfortunately, only available for Windoze. Essentially the only thing stopping me using it is it doesn’t display the code for existing projects when opening them - rather a big naughty! As I said the fault could be in .Net2.0 (which does install successfully now using winetricks) or in basic4android.

Benoit Misasini (author of Gambas) is considering adapting Gambas to work on Android (currently only available on Linux). That would be great. In fact, my to-be-written Android app is intended to access a SQLite3 database maintained by a back office app written already in Gambas.

Basic4android works successfully on Windows XP guesting in VirtualBox: however, it’s a pain to use because of the required flip-flopping between XP & the Ubuntu host when using a memory stick (backing up the Android projects), and similarly my Android phone connected by USB, and the fact that XP will not install my HP F2400 Deskjet printer, and the usage of my Brother Laser printer (by guest Windows XP) connected by USB to another computer on my LAN (can’t connect it to the router by ethernet as the print server inside the Brother printer is buggy & computers lose track of it). What a lot of gripes!

Are you saying USB passthrough isn’t working in your Vbox setup ?