Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't link pcre thru brew in max os yosemite

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?

like image 412
Tom Avatar asked Mar 28 '15 16:03

Tom


2 Answers

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.

like image 174
Kuba Avatar answered Nov 05 '22 06:11

Kuba


first

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

then

brew link pcre -f

then

brew install watchman

it should work

like image 35
Wang Kevin Avatar answered Nov 05 '22 06:11

Wang Kevin