Centos7安装watchman编译不通过

本文档详细记录了在CentOS7上安装watchman时遇到的编译问题及解决方案。首先,由于缺少openssl-devel导致编译失败,通过`yum install openssl-devel`进行安装。接着,因缺失Python头文件,需要安装python-devel。经过这些步骤,最终成功编译并安装watchman,通过`watchman -v`验证安装效果。
摘要由CSDN通过智能技术生成

Centos7安装watchman编译不通过

yum install autoconf automake libtool -y
wget https://github.com/facebook/watchman/archive/v4.9.0.tar.gz
tar zxvf v4.9.0.tar.gz
cd watchman-4.9.0
./autogen.sh
./configure
make && make install

如果你在编译时遇到这个错误,这可能是下面的原因:你尝试编译的程序使用OpenSSL,但是需要和OpenSSL链接的文件(库和头文件)在你Linux平台上缺少。

所以在CentOS下,

退到根路径,【需要在root用户下】然后输入:

yum install openssl-devel

安装完成后,重新编译又出现下面的错误:

watchman-ContentHash.o: In function `watchman::ContentHashCache::computeHashImmediate(watchman::ContentHashCacheKey const&) const':
watchman-4.9.0/ContentHash.cpp:65: undefined reference to `SHA1_Init'
watchman-4.9.0/ContentHash.cpp:78: undefined reference to `SHA1_Update'
watchman-4.9.0/ContentHash.cpp:81: undefined reference to `SHA1_Final'
collect2: error: ld returned 1 exit status

需要重新执行

./configure

重新编译后出现下面错误:

pywatchman/bser.c:31:20: 致命错误:Python.h:没有那个文件或目录
 #include <Python.h>

还需要安装 python-devel

yum install python-devel

最后编译安装成功,执行 watchman -v 查看是否安装成功

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值