[绍棠] 解决Mac OS X10.12下 Error watching file for changes: EMFILE及`brew link autoconf automake`错误

发现跑React-navtive项目报错了,错误标题为:Error watching file for changes: EMFILE具体表现如下图

查找资料后发现原来是升级后watchman不可用了,需要重装watchman。

第一种解决方案是打开终端后依次键入以下命令:

1.卸载原来安装的watchman: brew uninstall --force watchman

2.删除原来的安装文件: rm -rf /usr/local/var/run/watchman/

3.重新安装watchman: brew install watchman

第二种解决方案来自watchman的官方说明文档:https://facebook.github.io/watchman/docs/install.html

$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.7.0  # the latest stable release
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

官方文档介绍了一些安装使用方法以及错误解决方案,英文不错的同学可以去Lock一下。

在安装watchman的过程中可能会报错,如果遇到“Error: You must `brew link autoconf automake` before watchman can be installed”错误。请在安装的时候先在终端中依次键入以下命令:

1.链接到autoconf : brew link autoconf

2.链接到automake: brew link automake

   3.重新安装watchman:brew install watchman

在安装的时候当你看到

==> Downloading https://homebrew.bintray.com/bottles/watchman-4.7.0.sierra.bottl

######################################################################## 100.0 


表示watchman安装成功!

猜你喜欢

转载自blog.csdn.net/happyshaotang2/article/details/78589481
今日推荐