Ubuntu 14.10: Install Subversion 1.7.x

As of Ubuntu 14.10, the default subversion package from the repos is version 1.8.  I will underline the steps required to install Subversion 1.7.x for Ubuntu based systems here. I needed 1.7.x for compatibility reasons.

To begin with, I could not find any ppa that had subversion Ubuntu package for version 1.7. Hence I had to follow the traditional approach of downloading the source and compiling the same.

We will be using the source of SVN version 1.7.9 for this installation purpose.

As of standard installation of Ubuntu 14.10, I found the following two dependencies missing

1. Apr Utils

2. libneon (For http/https support of svn url scheme). Without this we would get the error: svn: Unrecognized URL scheme for ‘https..

The Apr Utils development libraries can be installed using the package as shown below.

user@computer:$ sudo apt-get install libaprutil1-dev

Installing neon libraries

The neon libraries can become tricky to install depending on the version of Ubuntu you are running.

Execute this command to check the neon version provided by the libneon27-dev

user@computer:$ sudo apt-cache show libneon27-dev | grep Version

If it showed : Version: 0.29.6-1       #  (Usually in Ubuntu Precise 12.04 based variants)

then run the below command as you have the correct library version required for subversion to have http/https support. You can skip to installing subversion after the below command is successful.

user@computer:$ sudo apt-get install libneon27-dev

Else if it showed any other version like 0.30.0-4 (For Ubuntu 14.10), then follow the below instructions to get the correct version of neon library.

Download the correct version from here: Neon-0.29.6 to compile and install the same before compiling Subversion source.

Proceed to the folder where you have downloaded the file ‘neon-0.29.6.tar.gz’

Now untar the file by executing the below command

user@computer:$ tar xvfz neon-0.29.6.tar.gz

Now this version of neon has a bug. (I told you neon dependency is a tricky one 🙂

If you compile neon and when you try to use this library while compiling subversion, you will typically find the error as shown below:

ne_openssl.c:572: undefined reference to `SSLv2_server_method’

To fix the above error proceed to the file ne_openssl.c located under $neon-0.29.6/src

proceed to line 572

You will see the lines of code as shown below:

 568     } else if (mode == NE_SSL_CTX_SERVER) {
 569         ctx->ctx = SSL_CTX_new(SSLv23_server_method());
 570         SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT);
 571     } else {
 572         ctx->ctx = SSL_CTX_new(SSLv2_server_method());
 573         SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT);
 574     }
 575     return ctx;
 576 }

The fix is to remove the else block starting from line 571 to 574, hence the effective code will be as shown below

 568     } else if (mode == NE_SSL_CTX_SERVER) {
 569         ctx->ctx = SSL_CTX_new(SSLv23_server_method());
 570         SSL_CTX_set_session_cache_mode(ctx->ctx,SSL_SESS_CACHE_CLIENT);
 571     }
 572     return ctx;
 573 }

You can find further details about the bug here: https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg4077331.html

Now save the file and exit and go to the parent directory neon-0.29.6 to start to compile neon

user@computer:$ ./configure --with-ssl
user@computer:$ make
user@computer:$ sudo make install

By default the neon libraries will be installed at /usr/local .

Installing Subversion 1.7

Download the Subversion 1.7.9 from here

Untar the file subversion-1.7.9.tar.gz and proceed to the file directory subversion-1.7.9


user@computer:$ ./configure

Among the messages you should also see this one below:

configure: checking neon library
checking for neon-config… /usr/local/bin/neon-config
checking neon library version… 0.29.6

if you don’t, then attempt again with below option in case you had to install neon manually

user@computer:$ ./configure --with-neon=/usr/local

Now proceed to

user@computer:$ make
user@computer:$ sudo make install

If all goes well you should be able to see the installed svn version as shown below:

user@computer:$ svn --version
svn, version 1.7.9 (r1462340)
compiled Mar 13 2015, 22:24:18
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
– handles ‘http’ scheme
– handles ‘https’ scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
– handles ‘svn’ scheme
* ra_local : Module for accessing a repository on local disk.
– handles ‘file’ scheme

Please do let me know if you have any alternate or easier method to install subversion 1.7.x in Ubuntu based systems, I will be glad to update the same here.

Please like & share:

Leave a Reply