I am installing a few Homebrew packages on a brand new Mac. However, there are some errors while linking:

ln: ./libsvn_wc-1.dylib: Permission denied
Error: The linking step did not complete successfully
The package built, but is not symlinked into /usr/local
You can try again using `brew link subversion'
Error: Could not create symlink /usr/local/lib/libsvn_wc-1.dylib.
Check that you have permssions on /usr/local/lib
==> Summary
/usr/local/Cellar/subversion/1.6.15: 88 files, 6.0M, built in 38 seconds

So SVN isn't really installed correctly, as we can see here:

charon:~ werner$ which svn
/usr/bin/svn

Same error for Git:

charon:~ werner$ brew link git
Error: Permission denied - /usr/local/lib/python2.6

However, this one's installed correctly:

charon:~ werner$ which git
/usr/local/bin/git

Should I just chmod the lib directory or is there anything else I should preferably do?

charon:~ werner$ ls -l /usr/local/
total 8
drwxr-xr-x   7 werner  staff   238 Mar  8 15:58 Cellar
drwxr-xr-x   6 werner  staff   204 Mar  8 14:21 Library
-rw-r--r--   1 werner  staff  1614 Mar  8 14:21 README.md
drwxr-xr-x  56 werner  staff  1904 Mar  8 15:59 bin
drwxr-xr-x   4 werner  staff   136 Mar  8 15:46 etc
drwxr-xr-x   3 werner  staff   102 Mar  8 15:59 include
drwxr-xr-x   3 root    wheel   102 Apr 17  2010 lib
drwxr-xr-x  12 werner  staff   408 Mar  8 15:57 share
drwxr-xr-x   4 root    wheel   136 Mar  8 14:43 texlive
link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

sudo brew [...]

Works just as good, and doesn't change permissions large-scale.

link|improve this answer
feedback

Okay, I could fix the issue according to the Homebrew installation instructions:

Most likely you’ve done a bit of “homebrew” installation already. We’ve had a lot of bug reports that are first inexplicable and later it turns out that it’s because the user has some of their own libs and headers in /usr/local. Homebrew can’t stop gcc and other build tools from using these libraries. Before you install we strongly recommend you delete the contents of these two directories.

This one did the trick:

sudo rm -rf /usr/local/lib/
link|improve this answer
3  
… keep in mind that homebrew isn´t necessarily the only thing that puts stuff into /usr/local/lib and you should definitely take a look into this directory before deleting its contents. – Asmus Mar 8 '11 at 15:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.