2

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:

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

2 Answers2

1

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
  • follow these step https://androidwave.com/install-and-setup-react-native-on-ubuntu/ – Surya Prakash Kushawah Apr 17 '19 at 08:04
  • @SuryaPrakashKushawah The link that you provided is not relevant OP's question, so much so his/her first sentence starts with "I am trying to install watchman...". The article the link points to doesn't even contain "watchman" keyword. – ozanmuyes Jul 21 '19 at 15:37
0

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