本文介绍了命令"brew install watchman"运行"chmod",但最终无法安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

它正在尝试chmod 777 /这是不好的.为什么要这样做呢?这样的感觉不应该被允许.我试图卸载watchman并使用此命令重新安装,以使React-native可以开始工作.

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.

此处遵循以下步骤: https://github.com/facebook/react-native/Issues/239

https://facebook.github.io/react-native/docs/疑难解答.html

推荐答案

确定已解决

您可以安装不带--HEAD选项的守望者(当前跟踪的守望者版本足够旧,无法指定问题).因此,只需执行brew install watchman.

You can install watchman without the --HEAD option (the currently tracked version of watchman is old enough to not have the issue specified). So just do a brew install watchman.

如果您随后在React项目中遇到问题,请确保您的项目目录是git repo(如果没有,请运行git init),请参见:

If you then get issues with your react project make sure that your project directory is a git repo (run git init if not) see:

https://github.com/facebook/react-native/issues/2032

https://github.com/facebook/react-native/issues/2042

这篇关于命令"brew install watchman"运行"chmod",但最终无法安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-13 22:30