ArchLinux上安装librdkafka
来源:互联网 发布:境外电视直播软件apk 编辑:程序博客网 时间:2024/05/22 04:28
ArchLinux上安装librdkafka
Table of Contents
- 1. 下载github代码
- 2. 编译
- 3. 安装
1 下载github代码
git clone https://github.com/edenhill/librdkafka.git
2 编译
确保在master branch中,然后运行命令
[dean@dell_xps_13 librdkafka]$ ./configure checking for OS or distribution... ok (Linux)checking for C compiler from CC env... failedchecking for gcc (by command)... okchecking for C++ compiler from CXX env... failedchecking for C++ compiler (g++)... okchecking executable ld... okchecking executable nm... okchecking executable objdump... okchecking executable strip... okchecking for pkgconfig (by command)... okchecking for install (by command)... okchecking for PIC (by compile)... okchecking for GNU-compatible linker options... okchecking for GNU linker-script ld flag... okchecking for __atomic_32 (by compile)... okchecking for __atomic_64 (by compile)... okchecking for socket (by compile)... okparsing version '0x00090100'... ok (0.9.1)checking for libpthread (by pkg-config)... failedchecking for libpthread (by compile)... okchecking for zlib (by pkg-config)... okchecking for libcrypto (by pkg-config)... okchecking for libssl (by pkg-config)... okchecking for libsasl2 (by pkg-config)... failedchecking for libsasl2 (by compile)... okchecking for regex (by compile)... okchecking for librt (by pkg-config)... failedchecking for librt (by compile)... okTchecking for strndup (by compile)... okchecking for nm (by env NM)... ok (cached)checking for python (by command)... okGenerated Makefile.configGenerated config.hConfiguration summary: prefix /usr/local ARCH x86_64 CPU generic GEN_PKG_CONFIG y ENABLE_DEVEL n ENABLE_VALGRIND n ENABLE_REFCNT_DEBUG n ENABLE_SHAREDPTR_DEBUG n ENABLE_SSL y ENABLE_SASL y MKL_APP_NAME librdkafka MKL_APP_DESC_ONELINE The Apache Kafka C/C++ library MKL_DISTRO Linux CC gcc CXX g++ LD ld NM nm OBJDUMP objdump STRIP strip CPPFLAGS -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith PKG_CONFIG pkg-config INSTALL install LIB_LDFLAGS -shared -Wl,-soname,$(LIBFILENAME) LDFLAG_LINKERSCRIPT -Wl,--version-script= RDKAFKA_VERSION_STR 0.9.1 MKL_APP_VERSION 0.9.1 LIBS -lpthread -lz -lcrypto -lssl -lsasl2 -lrt CFLAGS CXXFLAGS -Wno-non-virtual-dtor SYMDUMPER $(NM) -D exec_prefix /usr/local bindir /usr/local/bin sbindir /usr/local/sbin libexecdir /usr/local/libexec datadir /usr/local/share sysconfdir /usr/local/etc sharedstatedir /usr/local/com localstatedir /usr/local/var libdir /usr/local/lib includedir /usr/local/include infodir /usr/local/info mandir /usr/local/manGenerated config.cacheNow type 'make' to build
会出现一些failed信息, 只要在最后没有大段的错误信息,这些是可以接收的,因为只是在判断哪个库可可以用。比如
checking for C compiler from CC env... failedchecking for gcc (by command)... ok
运行make编译,很快完成。
3 安装
sudo make install, 默认会安装在/usr/local/目录下的lib和include/librdkafka目录中.
[dean@dell_xps_13 librdkafka]$ sudo make install[sudo] password for dean: make[1]: Entering directory '/home/dean/work/github/librdkafka/src'Install librdkafka to /usr/localinstall -d $DESTDIR/usr/local/include/librdkafka ; \install -d $DESTDIR/usr/local/lib ; \install rdkafka.h $DESTDIR/usr/local/include/librdkafka ; \install librdkafka.a $DESTDIR/usr/local/lib ; \install librdkafka.so.1 $DESTDIR/usr/local/lib ; \[ -f "rdkafka.pc" ] && ( \ install -d $DESTDIR/usr/local/lib/pkgconfig ; \ install -m 0644 rdkafka.pc $DESTDIR/usr/local/lib/pkgconfig \) ; \(cd $DESTDIR/usr/local/lib && ln -sf librdkafka.so.1 librdkafka.so)make[1]: Leaving directory '/home/dean/work/github/librdkafka/src'make[1]: Entering directory '/home/dean/work/github/librdkafka/src-cpp'Install librdkafka++ to /usr/localinstall -d $DESTDIR/usr/local/include/librdkafka ; \install -d $DESTDIR/usr/local/lib ; \install rdkafkacpp.h $DESTDIR/usr/local/include/librdkafka ; \install librdkafka++.a $DESTDIR/usr/local/lib ; \install librdkafka++.so.1 $DESTDIR/usr/local/lib ; \[ -f "rdkafka++.pc" ] && ( \ install -d $DESTDIR/usr/local/lib/pkgconfig ; \ install -m 0644 rdkafka++.pc $DESTDIR/usr/local/lib/pkgconfig \) ; \(cd $DESTDIR/usr/local/lib && ln -sf librdkafka++.so.1 librdkafka++.so)
Created: 2016-04-29 Fri 14:47
Validate
0 0
- ArchLinux上安装librdkafka
- 虚拟机上安装ArchLinux笔记
- archlinux上安装sublime编辑器
- archlinux上安装ros-indigo
- archlinux 上安装android-studio
- ubuntu 安装 librdkafka
- archlinux上安装QEMU+EFI BIOS
- 在Raspberry Pi上安装ArchLinux
- 在ArchLinux上安装单机版本kafka
- 教程:在Archlinux上配置安装Shadowscoks
- librdkafka的安装和使用
- ArchLinux安装
- archlinux安装
- 安装archlinux
- Archlinux安装
- Archlinux安装
- archlinux 安装
- 安装archlinux
- 边界值分析
- 菜鸟入门必备技能: 认识C中的委托和事件
- spring mvc使用ResourceBundleViewResolver配置的易错点
- count(字段)不统计null值http://blog.csdn.net/lwei_998/article/details/6112810
- C++学习笔记之八 复合类型---指针和自由存储空间
- ArchLinux上安装librdkafka
- 最小二乘法(Least Squares Fitting)
- Butter knife 最新版本8.0.1 解析
- BZOJ4154 [Ipsc2015]Generating Synergy
- 浏览器内部工作原理
- 返回hash 类型的json
- Butter Knife高级用法
- ArcEngine实现坐标转换和投影
- bat 批处理经典入门教程!(从不懂到高手)