I have a standard homebrew install inside of usr/local/
When I try:
Larson-2:~ larson$ brew install postgresql Error: Cannot write to /usr/local/Cell
You somehow have limited permissions to /usr/local/Cellar. Brew doesn't like to install with sudo which is why it refuses.
/usr/local/Cellar
Check the permissions:
ls -ld /usr/local/Cellar
Open them up for writing:
sudo chmod a+w /usr/local/Cellar