赞
踩
linux编译zk客户端,折腾了好久,感觉就是坑,记录一下~
想要库的直接下载:
编译出的头文件和库:
https://download.csdn.net/download/u013081817/51714320
下面进行编译步骤:
官网下载
apache-zookeeper-3.7.0.tar.gz
https://zookeeper.apache.org/releases.html
文件内容:
按照zookeeper-client里面的readme,在zookeeper根目录执行ant compile_jute,结果说build.xml不存在。
于是,按照网上说的,在zookeeper-jute目录执行mvn compile
成功后
进入zookeeper-client-c目录
执行ACLOCAL=“aclocal -I /usr/local/share/aclocal” autoreconf -if报错
于是下载安装libtool
官网
https://www.gnu.org/software/libtool/
libtool文件夹里有个m4
复制所有文件到/usr/local/share/aclocal文件夹
再次到zookeeper-client-c目录执行ACLOCAL=“aclocal -I /usr/local/share/aclocal” autoreconf -if
执行confiure到自己需要的文件夹
make
make install
查看文件
结束~
关于ACLOCAL=“aclocal -I /usr/local/share/aclocal” autoreconf -if的各种警告,参考:
https://stackoverflow.com/questions/15711824/autoreconf-stops-with-non-posix-variable-name
https://github.com/BitzenyCoreDevelopers/cpuminer/issues/5
https://stackoverflow.com/questions/64916994/build-xml-does-not-exist-when-install-zookeeper-client-c
https://github.com/vlm/asn1c/pull/63/commits/f9c7f85041b9914b68a6b582bf78d5c539854f6e
https://blog.csdn.net/weixin_33847182/article/details/91698292
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。