Homebrew install permissions issue

遇到类似的问题 :

Larson-2:~ larson$ brew install postgresql
Error: Cannot write to /usr/local/Cellar

And when I use sudo:

Larson-2:~ larson$ sudo brew install postgresql
Cowardly refusing to `sudo brew install'

What am I doing wrong?


How :

1. You somehow have limited permissions to /usr/local/Cellar. Brew doesn't like to install with sudo which is why it refuses.

Check the permissions:

ls -ld /usr/local/Cellar

Open them up for writing:

sudo chmod a+w /usr/local/Cellar

2. //:

https://github.com/Homebrew/homebrew/issues/17884

I am used to MacPorts, and I wanted to try homebrew. I followed the install instructions, and when I typebrew upgrade, I get:

Error: Cannot write to /usr/local/Cellar

This is a much poorer experience than MacPorts. What did I miss?


sudo chown -R $USER /usr/local


你可能感兴趣的:(issue,Homehrew,Cellar)