Note: I\'m not so good at using shell.
I was trying to install Valgrind using brew on Yosemite.
Valgrind
brew
brew install --HEAD valgrind<
I had same a problem about permission, but after I give my permission, still error permission. And here I do, first:
brew unlink valgrind
and then,
brew link valgrind
hope this help.