Install subversion 1.5.5 on Ubuntu

The latest subversion is 1.5.5 (as of now 2/3/2009), but it's not available yet in Ubuntu repository or web site (svn 1.4.6). So I tried to install it manually. I only need the client, not the server, so I would skip those parts that are only for server. I went through the following steps and finally was able to install it. Take it at your own risk.

0. Switch (su) to root.

1. Go to http://subversion.tigris.org/getting.html, and click the link Source Releases Area. Download subversion 1.5.5 source archive and the dependency tarball to Desktop (note: 2 separate gz files: subversion-1.5.5.tar.gz & subversion-deps-1.5.5.tar.gz). This site also lists binary downloads for various platforms. I checked Ubuntu and other Linux platforms, but they don't have 1.5.5 yet.

2. Unpack subversion source and dependency tarballs (note that both must be unpacked inside the same directory)

cd $HOME/tmp
tar xzvf $HOME/Desktop/subversion-1.5.5.tar.gz
tar xzvf $HOME/Desktop/subversion-deps-1.5.5.tar.gz
3. Try to configure and install it
cd $HOME/tmp/subversion-1.5.5
./configure --without-berkeley-db --without-apache --without-neon --without-swig
make install
4. If it failed at step 3, most likely some dependencies are still missing. In my case, openssl is reported missing, though I'm sure openssl is already installed. Anyway, download and install openssl. It should be straight-forward to install openssl from source:

Go to openssl.org to download the latest stable version of openssl (currently openssl-0.9.8j). Note: OpenSSL 0.9.8 has a problem that can cause SSL negotiation failure (SSL negotiation failed: SSL error: decryption failed or bad record mac). For more details, see http://wiki.open.collab.net/wiki/Subversion_Client_FAQ
cd $HOME/tmp
tar xzvf $HOME/Desktop/openssl-0.9.8j.tar.gz
cd openssl-0.9.8j
make install
5. Try installing subversion 1.5.5 again, with --with-openssl=/usr/local/ssl option, assuming openssl is installed to /usr/local/ssl.
cd $HOME/tmp/subversion-1.5.5
./configure --without-berkeley-db --without-apache --without-neon
--without-swig --with-openssl=/usr/local/ssl
6. If it fails due to zlib not present, try installing zlib1g-dev:
sudo apt-get install zlib1g-dev  (without sudo, if running as root)
7. Try installing subversion 1.5.5 again, with --with-zlib=... option:
./configure --without-berkeley-db --without-apache --without-neon
--without-swig --with-openssl=/usr/local/ssl --with-zlib=/usr/include
That should do it. Subversion 1.5.5 (at least the client) has been installed successfully!
/tmp > which svn

/tmp > svn --version
svn, version 1.5.5 (r34862)
compiled Feb 3 2009, 14:23:41

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* 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
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- handles 'http' scheme
- handles 'https' scheme

Update: After using this subversion client for about a month, I found a problem when committing changes to a repository with https. It only happens when running the commit sub-command using http protocol. It's probably related to the openssl issue mentioned above.


Tobias Weisserth said...

I can build it. I can run "svn --version". I can use it locally. But when I try to checkout something on https://.../trunk it segfaults. :-(

I built it with and without a manually installed OpenSSL.

javahowto said...

I have 2 separate svn repositories, one with http and the other https. I can connect to both with the svn client built this way. It has been working pretty smoothly.

Isaac said...

Instead of manually building and installing openssl, you can just apt-get libssl-dev.

Ganesan K said...

check the below link


Steve Smith said...

Great and Useful Article.

Online Java Training

Java Online Training India

Java Online Course

Java EE course

Java EE training

Best Recommended books for Spring framework

Java Interview Questions

Java Course in Chennai

Java Online Training India

Vũ Diệu Linh said...

I enjoyed on reading your blog post. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Please visit my website, Friv 4000 Games is where all the free friv games.
Friv 4000