librdkafka 安装

摘要:
今天,在安装php-kafka扩展时,出现一条错误消息,指示未安装librdkafka发行版。Phpsize期间出现以下消息:dk@dk-Inspiron-5576:/var/www/html/php-rdkafka$sudo./configurecheckingforgphathandleslonglinesand-e./bin/grapc

  今天在进行php的kafka的扩展安装的时候,出现了没有安装librdkafka distribuction的错误提示,

  进行Phpsize的时候出现如下的提示:

  

dk@dk-Inspiron-5576:/var/www/html/php-rdkafka$ sudo ./configure 
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for rdkafka support... yes, shared
checking for librdkafka/rdkafka.h" in default path... not found
configure: error: Please reinstall the rdkafka distribution

  需要重新安装这个扩展:

  rdkafka的编译安装:

  git地址:

  参考地址:  https://arnaud-lb.github.io/php-rdkafka/phpdoc/rdkafka.installation.manual.html

       可以考虑使用另外一种解决方案:

  

sudo apt-get install -y php-rdkafka

  问题解决.

免责声明:文章转载自《librdkafka 安装》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇frameset框架弹出层TOMCAT原理详解及请求过程(转)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

编译安装PHP以及需要的基本扩展库(php7.4)

安装配置选项1: ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir...

分享如何使用PHP将URL地址参数进行加密传输提高网站安全性

大家在使用PHP进行GET或POST提交数据时,经常会在URL带着参数进行传递,比如www.mdaima.com/get.php?id=1&page=5,这里就将id编号和page页码进行了参数传递,如果这样直接明文传输,会将参数直接暴露给用户,要是是比较重要的数据这样传输我觉得还是不太安全。那如果将参数变成下面这样,是不是会好点呢? 1 w...

PHP基础封装简单的MysqliHelper类

MysqliHelper.class.php 1: <?php 2: 3: /** 4: * MysqliHelper 5: * [面向对象的MysqliHelper的简单封装] 6: */ 7: class MysqliHelper 8: { 9: private static $mysqli; 10: private stat...

ansible 的用法

ansible 常用模块 1 command 模块 默认模块,不指定 -m 参数时,使用的就是 command 模块; 但 "<", ">", "|", and "&" 操作都不可以,当然,也不支持管道; 缺点:不支持管道,没法批量执行命令; 示例: ansible 192.168.2.20 -m command -a 'ifconfi...

用Zend Encoder加密PHP文件和PHP 优化配置

在发布一个你写好的PHP程序时,你是不是担心自已辛苦写出来的成果会被别人占为已有呢?其实我们可以用Zend Encoder为我们的PHP文件加上一层保护壳。 软件版本:2.0.1软件大小:10.2M适用平台:Win9X/2000/XP官方网址:http://www.zend.com/store/products/zend-encoder.php软件的使用方...

php批量上传图片并把图片名放入数据库

第一步肯定是首先把图片上传到对应的图片目录下,直接用框架中已经有的上传类: try{ $upload=newUpload(); $upload->set_ext(array('zip')); $path='目录名'; if( ! Io::mkdir($path)) // 创建目录 { thrownewException("无...