Can't link pcre thru brew in max os yosemite
Asked Answered
A

2

15

When I install watchman using brew install watchman, it got this Error: You must brew link pcre before watchman can be installed. So I try brew link pcre and brew link --overwrite pcre, I just got linking /usr/local/Cellar/pcre/8.36... Error: Could not symlink share/man/man3/pcre.3 /usr/local/share/man/man3 is not writable.

Can anyone help?

Anastomosis answered 28/3, 2015 at 16:10 Comment(1)
Sounds like there is a permission issue with /usr/local/share/man/man3 . Have you checked the folder permissions for this folder?Lepidote
E
36

By design Homebrew (brew) requires the contents of /usr/local to be owned by you. You can fix it easily by running:

sudo chown -R `whoami` /usr/local

from your Terminal.

See here for further explanation.

Equiangular answered 28/3, 2015 at 19:27 Comment(3)
Actually chown doesn't work for me. I use 'chmod 777 /usr/local/share/man/man3' to get through. Thanks.Anastomosis
thanks. This solved so many issues I had with homebrew. Not sure how /usr/local got mucked up in the first place!Livvi
I wouldn't recommend on going chmod 777 as this is way insecure.Rennin
R
5

first

sudo chown -R 'your name' /usr/local

then

brew link pcre -f

then

brew install watchman

it should work

Relate answered 1/6, 2016 at 8:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.