A web developing, photo taking, Muay Thai fighting man.

Installing Subversion 1.6.6 from source on Ubuntu 8.04

Posted: November 3rd, 2009 | Author: James | Filed under: linux | Tags: , , , | 7 Comments »

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/).

Share/Save/Bookmark


7 Comments on “Installing Subversion 1.6.6 from source on Ubuntu 8.04”

  1. 1 Andy Bright said at 11:09 am on November 14th, 2009:

    I had some dependency hassle when compiling PHP on ubuntu recently, until I discovered the amazing apt-get build-dep PackageName command.

    There is a good chance that apt-get build-dep subversion will grab all the dependencies for compiling subversion.

  2. 2 William Notowidagdo said at 3:31 am on December 4th, 2009:

    Good post.

    I believe ‘make install’ should be ‘sudo make install’.

  3. 3 Ryan Raines said at 2:31 pm on December 11th, 2009:

    It works – thanks James.

  4. 4 Ryan Raines said at 2:34 pm on December 11th, 2009:

    Ubuntu8.04.3
    minor corrections you might consider:
    ‘svn -version’ should be ‘svn –version’
    ‘make install’ should be ‘sudo make install’ (need write permissions)

  5. 5 James said at 2:39 pm on December 11th, 2009:

    Thanks.. changes made where required.

  6. 6 asartalo said at 11:23 am on January 19th, 2010:

    Thanks for the tutorial. I had some problems running ./configure on my system (Jaunty). I kept getting this error:

    configure: error: failed to recognize APR_INT64_T_FMT on this platform.

    After goggling around for answers (got some answers from these email exhanges: http://svn.haxx.se/dev/archive-2005-01/1120.shtml), it turns out that my SVN_APR_INCLUDES path points to my xampp installation:

    SVN_APR_INCLUDES: -I/opt/lampp/include

    And that’s because I edited $PATH variable to point to my xampp bin directory by editing my ~/.bashrc file like this:

    export PATH=”/opt/lampp/bin:$PATH”

    To fix the problem, I had to simply comment out that line:

    #export PATH=”/opt/lampp/bin:$PATH

    and ./configure finally worked.

    Thanks for the tutorial and I hope this little bit of information helps someone else. :)

  7. 7 bimalvdas said at 5:13 pm on June 22nd, 2010:

    Wonderful post

    It simply worked going through step by step.

    just had a problem @
    ./configure –prefix=/usr/bin/subversion-1.6.6 –disable-nls

    but with ./configure it worked fine.

    cheers


Leave a Reply