fedora安装watchman

1.首先下载watchman

git clone https://github.com/facebook/watchman.git
2.然后切换到最新版本

 cd watchman

 git checkout v4.9.0  # the latest stable release

3.安装工具

sudo dnf install libtool*

4.然后执行

 ./autogen.sh

5.执行 ./configure

我的报错了:

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... no
checking whether g++ supports C++11 features with -std=c++0x... no
checking whether g++ supports C++11 features with +std=c++11... no
checking whether g++ supports C++11 features with -h std=c++11... no
configure: error: *** A compiler with support for C++11 language features is required.

a.需要安装g++

然后执行:sudo yum install gcc-c++

b.然后执行make又报错:

ContentHash.cpp:13:10: 致命错误:openssl/sha.h:No such file or directory
 #include <openssl/sha.h>
          ^~~~~~~~~~~~~~~

解决办法执行:yum -y install  openssl-devel


c.然后再执行make,又报错

watchman-ContentHash.o: In function `watchman::ContentHashCache::computeHashImmediate(watchman::ContentHashCacheKey const&) const':
ContentHash.cpp:(.text+0x8d4): undefined reference to `SHA1_Update'
ContentHash.cpp:(.text+0x8fc): undefined reference to `SHA1_Final'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1566:watchman] 错误 1
make[1]: 离开目录“/home/liuxu/github/watchman”

解决办法再运行一次./configure,然后再运行make,又报错了:

gcc: 错误:/usr/lib/rpm/redhat/redhat-hardened-cc1:No such file or directory
error: command 'gcc' failed with exit status 1
make[1]: *** [Makefile:5059:py-build] 错误 1
make[1]: 离开目录“/home/liuxu/github/watchman”
make: *** [Makefile:1100:all] 错误 2


解决办法:

sudo dnf install redhat-rpm-config

再次运行make又报错了:

pywatchman/bser.c:31:10: 致命错误:Python.h:No such file or directory
 #include <Python.h>
          ^~~~~~~~~~

解决办法:

sudo yum install python-devel

然后再执行:

 sudo make install


因为inotify默认内核参数值太小,修改之:
echo 256 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
watchman shutdown-server

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值