RSS Feed
Mar 2

Updating Subversion in OS X 10.5.6

Posted on Monday, March 2, 2009 in Code Pays the Bills, Mac OS X

I’ve been using Aptana for my PHP IDE lately, and it comes with a newer version of the Subversion client libraries than OS X 10.5.6 does.  That ended up breaking my ability to use the command line or the IDE interchangeably.

Note: As a precaution, you may want to temporarily move your /usr/lib/libexpat* files out of the way until the compile is completed. They gave me some trouble. When finished you can move them back.

Here are the quick steps I took to compile a new version of Subversion in /usr/local that won’t conflict with future OS X updates:

mkdir ~/svn-src && cd ~/svn-src
curl -O http://subversion.tigris.org/downloads/subversion-1.5.6.tar.bz2
curl -O http://subversion.tigris.org/downloads/subversion-deps-1.5.6.tar.bz2
tar xvjf subversion-1.5.6.tar.bz2
tar xvjf subversion-deps-1.5.6.tar.bz2
cd subversion-1.5.6
./autogen
./configure --prefix=/usr/local --with-ssl
make
sudo make install

After you’ve compiled and installed, you want to move /usr/local/bin to the front of your $PATH.  To do so, edit your ~/.profile (or create it) and add the line:

export PATH=/usr/local/bin:$PATH

Open up a new Terminal session and type:

svn --version

You should see a first line of output like:

svn, version 1.5.6 (r36142)

That’s it!