Managing Subversion installs on OS X

1

I'm fairly new to OS X. I've updated SVN on my Mac using Homebrew. I now have a copy of svn in /usr/bin (v1.7.10) and a copy in /usr/local/bin (v1.8.5). This copy is a symlink to ../Cellar/subversion....

On the commandline which svn gives me /usr/bin/svn – the older one.

My $PATH is /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin. /usr/bin is before /usr/local/bin which explains why the older version of SVN is used.

What is the recommended way to fix this? Should I delete the svn files from /usr/bin?

GlennH

Posted 2014-01-01T15:16:52.937

Reputation: 13

Answers

1

No, you should never modify or delete the system files in /usr/bin. Some scripts may rely on /usr/bin/svn.

Instead, modify your path to put /usr/local/bin before /usr/bin. Put the following into your ~/.bash_profile:

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

grg

Posted 2014-01-01T15:16:52.937

Reputation: 1 499

I'm left with two different versions of svn installed. Do folks just ignore this? Ought I to point the /usr/bin svn files to the newer ones in /Cellar/subversion? – GlennH – 2014-01-01T19:45:14.543

@GlennH Yeah, there's no problem leaving two. Don't mess with /usr/bin — it might cause more harm than good. – grg – 2014-01-01T20:01:56.120

I'd use export PATH=/usr/local/bin:$PATH instead of completely rewriting the PATH-Variable as it leaves a previously altered PATH intact – heiglandreas – 2014-01-02T15:10:08.847