1

I have installed the latest SVN 1.8 via homebrew on my Mac. However now If I run svn --version I get back that I have 1.7. Next thinng I run which -a svn which then shows me I have it twice:

/usr/bin/svn
/usr/local/bin/svn

If I run /usr/local/bin/svn --version I get back 1.8

How do I now tell my MAC that the default binary to use is /usr/local/bin/svn and not /usr/bin/svn?

2
  • 1
    By deleteing /usr/bin/svn? ;) Jul 30, 2014 at 12:13
  • I am not sure if this is a smart idea, since this comes with Xcode and I don't know if I will face some issues with that. Is the binary that is the default arbitrary? I can't imagine, it has to be defined somewhere, just where?
    – Dominik
    Jul 30, 2014 at 12:30

2 Answers 2

2

Symbolic link is the solution, take a look: https://stackoverflow.com/questions/11198782/svn-use-from-default-path-usr-bin-instead-of-opt-local-bin

You already have svn in two locations:

   /usr/bin/svn
   /usr/local/bin/svn

If you create symbolic links for svn in /usr/local/bin with the same name, it will effectively remove the binaries from the macport.

or else you have to create symbolic link with different name which is not very useful.

How about having an alias that points to the one you want to use:

 alias svn=/usr/bin/svn
0

Edit your PATH variable. Put /usr/local/bin before /usr/bin and possibly before many other dir's, as this allows anything you have specifically compiled/installed to override the system defaults. Obviously, take care that you know what's in /usr/local/bin first, but it sounds like you do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .