Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not "brew install postgresql"

I cannot install postgresql with homebrew.

$ brew install postgresql
Error: Could not create /usr/local/Cellar
Check you have permission to write to /usr/local

I am not sure if homebrew was installed well. If you need more information, I will update this.

like image 465
Junichi Ito Avatar asked Mar 06 '12 06:03

Junichi Ito


People also ask

Why is PostgreSQL not installing?

If you encounter an error about being unable to create the postgres service user, turn off any antivirus programs and re-run the installer. >\database directory and manually set the permissions for the \data subdirectory. If the subdirectory \data does not exist, create. Then uninstall PostgreSQL and re-install.

Is PostgreSQL running Mac?

PostgreSQL can also be installed on macOS using Homebrew.


2 Answers

I created /usr/local/Cellar by myself, then could install successfully.

like image 195
Junichi Ito Avatar answered Sep 20 '22 17:09

Junichi Ito


I find that if I get this problem with brew I just fix the permissions on the /use/local folder:

sudo chown -R $(whoami):admin /usr/local

like image 45
Rob MacDonald Avatar answered Sep 18 '22 17:09

Rob MacDonald