I am trying to install memcached using:
brew install memcached
This ends in error about homebrew not being able to create a symlink:
It seems that since El Capitan the file permissions in /usr/local have been changed, causing the above problem for me.
Instead of the chosen solution I suggest to do a:
sudo chown -R :staff /usr/local
This will work for all users
after i performed the suggestions in @septerr answer, i still was unable to install carthage via homebrew... after some googleing i found this: Gist https://gist.github.com/dalegaspi/7d336944041f31466c0f9c7a17f7d601
Anyway... got this:
Error: An unexpected error occurred during the 'brew link' step The formula built, but is not symlinked into /usr/local Permission denied @ dir_s_mkdir - /usr/local/Frameworks Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
did this:
sudo chown -R $(whoami) $(brew --prefix)/*
and
sudo install -d -o $(whoami) -g admin /usr/local/Frameworks
after that is was able to install carthage successfully
As of High Sierra, /usr/local is no longer chown-able. The new procedure suggested in a Homebrew issue is:
sudo chown -R $(whoami) $(brew --prefix)/*
FYI: If required /usr/local subfolders (e.g. ./include or ./Frameworks) are missing, you'll have to mkdir them first
Thanks for updating your own question this helped me a lot. I fixed this issue by making all locations in /usr/local
writable to group as I am already in the admin group.
To do this just use the following command
sudo chmod -R g+w /usr/local
I uninstalled what homebrew had so far installed (libevent dependency):
brew uninstall libevent
Then chow-ned the usr/local directory:
sudo chown -R $(whoami) /usr/local
Then tried to install memcached again and it worked:
brew install memcached