James RJ Constable

Installing Subversion 1.6.6 from source on Ubuntu 8.04

I’ve got a number of servers that are currently running the latest LTS release of Ubuntu, 8.04. Unfortunately this release doesn’t have the latest version of subversion (1.6.6 at time of writing) available from apt and as the various clients that get used to access these working copies get updated, they stop working with the command line version on the server (1.5.1).

I found installing from source a bit fiddly at first but after some research managed to get everything hooked up as required.

Start off by grabbing the latest version from the subversion site and untar/gzipping it

wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz
tar xf subversion-1.6.6.tar.gz

There’s a few pre-requisites that need to be installed to compile subversion so if you’ve not already got them add these packages.

sudo apt-get install libc6-dev g++ gcc
sudo apt-get install libapr1 libapr1-dev libaprutil1 libaprutil1-dev libneon27 libneon27-dev

Configure the compilation from within the newly uncompressed directory and declare where you want the binaries to be saved to

./configure –prefix=/usr/bin/subversion-1.6.6 –disable-nls

And finally run the make process

make
sudo make install

All being well you should have the latest version of subversion accessible from the directory you specified (in our case /usr/bin/subversion-1.6.6). If you want this new version to precede the existing version so you don’t have to write in the full path each time. Alter /etc/environment and add the path to the newly installed subversion to the start of the PATH variable. e.g.

PATH=”/usr/bin/subversion-1.6.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”

Reload you environment file with

source /etc/environment

And type svn ––version to check that you do indeed have SVN 1.6.6 installed

svn, version 1.6.6 (r40053)
compiled Nov 3 2009, 12:19:16
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
svn, version 1.6.6 (r40053) compiled Nov 3 2009, 12:19:16
Copyright (C) 2000-2009 CollabNet.Subversion is open source software, see http://subversion.tigris.org/This product includes software developed by CollabNet (http://www.Collab.Net/).