I am trying to install watchman in Ubuntu 17.10, to run npm run android in command line to run React-Native in terminal.

I have tried sudo apt-get install -y autoconf automake build-essential python-dev,

then when I run ./autogen.sh, it throws this error:

pkg-config appears to be missing (not available to autoconf tools)
please install the pkg-config package for your system.
  • 6
    silly question, but have you installed pkg-config, as in sudo apt install pkg-config?
    – Zanna
    Apr 6, 2018 at 19:28

2 Answers 2


Had similar problem and turns out that I was missing some binaries and that needed to run the watchman scripts as root. Here is a shorts script that I used to get everything working:

# install watchman
sudo apt install -y libssl-dev autoconf automake libtool build-essential python-dev
cd $HOME
git clone https://github.com/facebook/watchman.git
cd watchman
git checkout v4.9.0  # the latest stable release
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install

# linux specific watchman configs
watchman --version
# increasing the watcher limits (need to do every time machine starts up)
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 && \
# restart server
watchman shutdown-server

I had similar problem. I install pkg-config, then it is solved

sudo apt install pkg-config

Accept the installation by typing Y or y

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.