CapSap
CapSap

Reputation: 53

Problems trying to install watchman on xubuntu 22.10 (2 methods used- compling and using deb file)

I'm trying to set up my pc for some android app development with react native. Following the react native docs, installing watchman is recommended: https://reactnative.dev/docs/environment-setup

I have tried installing using the deb: watchman_ubuntu22.04_v2022.11.07.00.deb

with the following output:

sudo dpkg -i watchman_ubuntu22.04_v2022.11.07.00.deb 
[sudo] password for sheila: 
Selecting previously unselected package watchman.
(Reading database ... 238878 files and directories currently installed.)
Preparing to unpack watchman_ubuntu22.04_v2022.11.07.00.deb ...
Unpacking watchman (20221102.224517.0) ...
dpkg: dependency problems prevent configuration of watchman:
 watchman depends on libevent-2.1-7; however:
  Package libevent-2.1-7 is not installed.

dpkg: error processing package watchman (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 watchman

From here, I've downloaded the libevent-2.1-7 package deb but have this error when attempting to install it i get the following conflicting package error:

sudo dpkg -i libevent-2.1-7_2.1.11-stable-1_amd64.deb 
dpkg: regarding libevent-2.1-7_2.1.11-stable-1_amd64.deb containing libevent-2.1-7:amd64:
 libevent-2.1-7a:amd64 conflicts with libevent-2.1-7
  libevent-2.1-7:amd64 (version 2.1.11-stable-1) is to be installed.

dpkg: error processing archive libevent-2.1-7_2.1.11-stable-1_amd64.deb (--install):
 conflicting packages - not installing libevent-2.1-7:amd64
Errors were encountered while processing:
 libevent-2.1-7_2.1.11-stable-1_amd64.deb

There were two packages missing; libgoogle-glog0v5_0.5.0+really0.4.0-2_amd64 and libevent. I was able to install libgoogle-glog0v5 okay.

At this stage with the conflicting packages is where I'm asking for help. I do not know how to resolve this.

I've also attempted to build watchman steps I took were:

git clone https://github.com/facebook/watchman.git
cd watchman
git checkout -b v2022.11.07.00
sudo ./install-system-packages.sh
sudo ./autogen.sh

and i get this error:

CMake Error at build/fbcode_builder/CMake/RustStaticLibrary.cmake:61 (find_program):
  Could not find CARGO_COMMAND using the following names: cargo
Call Stack (most recent call first):
  CMakeLists.txt:139 (include)

I do have cargo installed- in terminal running command cargo version returns cargo 1.65.0 (4bc8f24d3 2022-10-20)

I did run into some other errors while running ./autogen.sh one of them was

Linking CXX executable bin/watchman
FAILED: bin/watchman 

but running sudo ./autogen.sh appears to fix this error.

Thanks for your time reading this. Any help will be great

Here is a larger chunk of the termnial (I wasnt sure what to include):

TpQjkMMS39M_KEls/lib/pkgconfig:\
+ PYTHONPATH=\
+      /tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/installed/fb303/lib/fb-py-libs/fb303_thrift_py:\
+      /tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/installed/fbthrift/lib/fb-py-libs/thrift_py_inspect:\
+      /tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/installed/fbthrift/lib/fb-py-libs/thrift_py:\
+      /tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/installed/python-six-a_PuBql0-TcavVCS0SYl5gjjcl7jCpIVWAuUaU9OOJM/lib/fb-py-libs/python-six:\
+ SSL_CERT_DIR=/etc/ssl/certs \
+ THRIFT_INCLUDE_PATH=/tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/installed/fb303/include/thrift-files \
+ cd /tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/build/watchman && \
+ /usr/bin/cmake \
+      /home/sheila/Downloads/watchman \
+      -DCMAKE_INSTALL_PREFIX=/usr/local \
+      -DBUILD_SHARED_LIBS=OFF \
+      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+      -G \
+      Ninja
-- PACKAGE_VERSION=20221102.224517.0, BUILD_INFO=2911933b5cc68cbb1d1d27adc38fad0f7bdc8efa
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found gmock via config, defines=, include=/usr/include, libs=GTest::gmock_main;GTest::gmock;GTest::gtest
CMake Error at build/fbcode_builder/CMake/RustStaticLibrary.cmake:61 (find_program):
  Could not find CARGO_COMMAND using the following names: cargo
Call Stack (most recent call first):
  CMakeLists.txt:139 (include)


-- Configuring incomplete, errors occurred!
See also "/tmp/fbcode_builder_getdeps-ZhomeZsheilaZDownloadsZwatchmanZbuildZfbcode_builder-root/build/watchman/CMakeFiles/CMakeOutput.log".
Command '['/usr/bin/cmake', '/home/sheila/Downloads/watchman', '-DCMAKE_INSTALL_PREFIX=/usr/local', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-G', 'Ninja']' returned non-zero exit status 1.
!! Failed

Upvotes: 4

Views: 2154

Answers (1)

scott
scott

Reputation: 1478

On Ubuntu 22.10 you can simply run:

sudo apt-get -y install watchman

Upvotes: 2

Related Questions