Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the command `brew install watchman` runs `chmod` but fails to install eventually

brew install --HEAD watchman
==> Cloning https://github.com/facebook/watchman.git
Updating /Library/Caches/Homebrew/watchman--git
==> Checking out branch master
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/watchman/HEAD --with-pcre
==> make
==> make install
install: chmod 777 /: Operation not permitted
touch //.not-empty
touch: //.not-empty: Permission denied
make[1]: *** [install-exec-local] Error 1
make: *** [install-am] Error 2
couldn't understand kern.osversion `14.5.0'

READ THIS: https://git.io/brew-troubleshooting

It is trying to chmod 777 / which is not good. Why is it trying to do that? Feels like that shouldn't be allowed. I tried to uninstall watchman and reinstall with this command to get a react-native to start working.

Followed steps here: https://github.com/facebook/react-native/issues/239

https://facebook.github.io/react-native/docs/troubleshooting.html

like image 407
Shail Patel Avatar asked Nov 28 '22 06:11

Shail Patel


1 Answers

brew uninstall watchman
sudo chown -R `whoami` /usr/local
brew link pcre
brew install watchman
like image 198
MTZ4 Avatar answered Dec 05 '22 05:12

MTZ4