美文网首页
react-native 安装 watchman 失败

react-native 安装 watchman 失败

作者: 我的昵称好听吗 | 来源:发表于2019-05-07 13:59 被阅读0次

按照rn官网上操作,执行brew install watchman按照失败,错误日志如下
react-native 官网: https://reactnative.cn/docs/getting-started.html

$ brew install watchman
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD: Permission denied
==> Downloading https://homebrew.bintray.com/bottles/watchman-4.9.0.high_sierra.
Already downloaded: /Users/zhuge/Library/Caches/Homebrew/watchman-4.9.0.high_sierra.bottle.tar.gz
==> Pouring watchman-4.9.0.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/doc/watchman-4.9.0
/usr/local/share/doc is not writable.

You can try again using:
  brew link watchman
==> launchctl unload -F /Users/zhuge/Library/LaunchAgents/com.github.facebook.wa
==> Summary
🍺  /usr/local/Cellar/watchman/4.9.0: 23 files, 2MB

解决方法:

在终端执行以下命令后,输入密码稍等片刻即可,然后重新进行安装watchman
sudo chown -R $(whoami) /usr/local

相关文章

网友评论

      本文标题:react-native 安装 watchman 失败

      本文链接:https://www.haomeiwen.com/subject/tcueoqtx.html