Watchman: error loading shared libraries: libpcre.so.1

I am working on Ubuntu 15.10 and I am developing an Android application (SDK 23) using native-native (0.20.0). I am using node 5.6.0 and npm 3.6.0.

At startup react-native start

I found a gatekeeper error,
ERROR  watchman--no-pretty get-sockname returned with exit code 127 watchman: 
error while loading shared libraries: libpcre.so.1: cannot open shared object 
file: No such file or directory

    at ChildProcess.<anonymous> (/home/rachael/Dev/InstaGo/node_modules/fb-watchman/index.js:198:18)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:827:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:471:12)

When I started sudo find / -name libpcre.so.1, the following returns:

/home/rachael/.linuxbrew/lib/libpcre.so.1
/home/rachael/.linuxbrew/Cellar/pcre/8.38/lib/libpcre.so.1

I tried reinstalling the watchman:

make uninstall

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

I also tried this with linuxbrew:

npm r -g watchman 
brew update && brew upgrade
brew install watchman

which gave a completely different error:

A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1407695600: inotify-add-watch(/my/path) -> Cannot allocate memory
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.imtqy.com/watchman/docs/troubleshooting.html#poison-inotify-add-watch

The Facebook troubleshooting page for this is extremely vague, and I was also unable to resolve this error.

I am very new to this, so I would appreciate any help on this issue. Thank you for your time.

Update

Install the watchman through linuxbrew.

When using linuxbrew, be sure to include the following commands before installing any formula:

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
brew update && brew upgrade

:

brew install --HEAD watchman

inotify , :

echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

, react-native start !

+4
2

.

, , react-native start, .

  • watchman shutdown-server
  • react-native start
  • .

. .

0

All Articles