Your /usr/local/Cellar/ not writable by brew. Check permissions on this folder.
ls -lA /usr/local/ | grep Cellar
In this case, he needs write permissions:
chmod u+rw /usr/local/Cellar/
It is also possible that the folder is owned by root .
ls -lA /usr/local/ | grep Cellar
In this case, you need to change the owner:
chown $(whoami):admin /usr/local/Cellar/
And you may have to execute the chown and chmod commands.
This is usually caused by running brew with sudo ( sudo brew install subversion ). Usually you do not want this. brew should ask for your password if it needs sudo and this will give the folders and files the correct permissions.
Nate
source share