Skip to content

Instantly share code, notes, and snippets.

@ivan-loh
Last active January 27, 2022 13:02
Show Gist options
  • Star 35 You must be signed in to star a gist
  • Fork 16 You must be signed in to fork a gist
  • Save ivan-loh/4fb6728613b6bd5b185cb3e8314f07a4 to your computer and use it in GitHub Desktop.
Save ivan-loh/4fb6728613b6bd5b185cb3e8314f07a4 to your computer and use it in GitHub Desktop.
Watchman ( 4.9.0 ) installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool
./autogen.sh
./configure
make
sudo make install
# raise inotify limit
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && \
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && \
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && \
watchman shutdown-server
@robertkellermann
Copy link

facecbook => facebook

@MrTortoise
Copy link

also add libtools to the install line

@jkrishnanmen
Copy link

This one worked for Ubuntu 16. Others were failing.

@hugogrochau
Copy link

I also needed to install libssl-dev

@ivan-loh
Copy link
Author

ivan-loh commented Oct 14, 2017

@JWebCoder
Copy link

I needed to install pkg-config

@sarancruzer
Copy link

$ cd ~
$ git clone https://github.com/facebook/watchman.git
$ cd watchman/
$ git checkout v4.7.0
$ sudo apt-get install -y autoconf automake build-essential python-dev
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

$ watchman --version
$ echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && watchman shutdown-server

@jazzfog
Copy link

jazzfog commented Feb 20, 2018

Thanks for the script.
+1 for apt-get install pkg-config. Probably I do not have it because I am installing watchman into a docker container.

@Dayjo
Copy link

Dayjo commented Feb 22, 2018

Same as @jazzfog, I had to install pkg-config

@f4th4n
Copy link

f4th4n commented Jun 10, 2018

Line 5 change to

sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool pkg-config

@ashinzekene
Copy link

I get this error while running make

make  all-am
make[1]: Entering directory '/home/ekene/watchman'
  CXXLD    watchman
/usr/bin/x86_64-linux-gnu-ld: libwildmatch.a(wildmatch.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:1566: recipe for target 'watchman' failed
make[1]: *** [watchman] Error 1
make[1]: Leaving directory '/home/ekene/watchman'
Makefile:1101: recipe for target 'all' failed
make: *** [all] Error 2

@cstrahan
Copy link

cstrahan commented Jul 5, 2019

Note that with more recent versions of gcc, you'll need to do ./configure --enable-lenient so that warnings aren't promoted to errors.

See facebook/watchman#638 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment