Saturday, 20 June 2009

3 Ways to Install Latest Wine in Ubuntu 9.04 Jaunty Jackalope

I decided to put up this guide which shows how to install the latest Wine release in Ubuntu 9.04 using 3 different methods. The default Jaunty repositories come with Wine 1.0.1, but the latest release is 1.1.24 and a new version is available every two weeks, so here is a tutorial which explains how to get the last Wine release in Ubuntu or Kubuntu Jaunty.

I. Using the Wine PPAA PPA (Personal Package Archives) is a separate repository which ships newer packages for various applications. You can use a PPA repository for installing newer versions of Amarok, or Wine, or Banshee etc. These repositories are hosted on Launchpad.

In order to get the latest Wine available, you can follow these easy steps:

1. Add the Wine PPA repositories to the /etc/apt/sources.list fileOpen the /etc/apt/sources.list file as root with your favourite text editor (e.g. gksudo gedit /etc/apt/sources.list or sudo nano /etc/apt/sources.list) and enter your user password. Then add the following two lines to this file and save it:

You can also use Shift+Insert here. Then make sure to save the file and update the sources lists:

sudo apt-get update

After updating, this warning may appear:

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9A06AEF9CB8DB0 W: You may want to run apt-get update to correct these problems

You can either ignore it, or (optionally), install the trusted key for these repositories. In order to get the key, follow the instructions from here. Notice that this is an optional step, so you can skip it or add the key later.

Then, install Wine:

sudo apt-get install wine

Press Y when it asks to install packages from untrusted sources. This should be all, the latest Wine should be now installed (at the time of writing, the version available in this PPA is 1.1.23).

II. Compile and Install Wine from SourceThis method needs more time, but this way you get to compile your own version of Wine, without using any additional repositories. Here's what you have to do:

1. Install the needed dependencies and compiling toolsFirst, make sure you have the sources repositories enabled, that is, a line which starts with deb-src and looks like this:

Notice that in Jaunty these are enabled by default, so, unless you deleted this line from the /etc/apt/sources.list file, you don't have to add anything here.

Next, type the following:

sudo apt-get build-dep wine

This command will fetch all the needed development libraries for compiling Wine, including the package build-essential, which is a meta-package consisting of tools needed to compile C/C++ sources like g++.

2. Get the Wine tarball from the official websiteDownload the Wine source from the official website (direct link here) and uncompress it (e.g. tar -xjf wine-1.1.24.tar.bz2).

3. Compile and install WineMake sure the current working directory is wine-1.1.24 (or whatever version you have), and issue the following commands:

./configuremake depend && makesudo make install

This should be all. Notice that you can also use a different path and install as normal user:

./configure --path=/home/USER/usrmake depend && makemake install

This will install Wine inside the /home/USER/usr directory (replace USER with your username). In this case, make sure /home/USER/usr/bin is added to your $PATH variable, preferable before the other paths.

III. Using the WineHQ Ubuntu repositoriesThis is yet another method of getting the latest Wine on Ubuntu. It is similar with the first method, but instead of adding a PPA repository we'll add the WineHQ repositories. Follow the steps below:

1. Add the repositories to /etc/apt/sources.listAdd the following repositories to your sources.list file:

No jorge, you didn't mess up. It means 1.1.23 is available in the repositories at the current time. 1.1.24 was released just two days ago and probably they hadn't built the packages yet, but the repository should be updated soon. Method #2 will definitely install the latest, if compiling and getting all those dependencies is not a problem for you.

You should add:-wget http://wine.budgetdedicated.com/apt/387EE263.gpg-gpg --import 387EE263.gpg-sudo apt-key add 387EE263.gpg to the third step make sure that the wine repo is secure. (see http://wiki.winehq.org/GPGKey)

So I followed method 2 and successfully installed and compiled Wine 1.1.25.

Since I didn't use the uBuntu 9.04 installer it seems like it doesn't recognised that version 1.1.25 is installed. How would I manually remove everything I did if needed? The compiling tools, libraries, Wine itself (both sources and compiled versions).