通过 PECL 安装 AMQP [英] Installing AMQP through PECL

查看:54
本文介绍了通过 PECL 安装 AMQP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 RabbitMQ PECL 扩展,但在运行之后

I'm trying to install the RabbitMQ PECL extension but after running

sudo pecl install amqp

我收到以下神秘的错误消息,大量的谷歌搜索没有帮助解决.

I get the following cryptic error message, which extensive googling hasn't helped resolve.

我安装了这些软件包:

  • librabbitmq - RabbitMQ C 客户端本身)
  • librabbitmq-dev - 开发标头等

和RabbitMQ在本地主机上成功运行

and RabbitMQ running successfully on localhost

也许是 C 客户端的版本与 PECL 扩展的期望不匹配,还有其他人遇到过这个问题吗?

Maybe it could be a mismatch in the version of the C client and what the PECL extension expects, anybody else come across this one?

在下面输出....

干杯

running: make
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc  -I.         -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-        1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp -      I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -       I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -    D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp.c -o amqp.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-   build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -   I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -  I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -  D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c    /tmp/pear/temp/amqp/amqp.c  -fPIC -DPIC -o .libs/amqp.o
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc  -I.    -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-  1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp -   I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -   I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -   D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_CONFIG_H  -g -O2   -c     /tmp/pear/temp/amqp/amqp_exchange.c -o amqp_exchange.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-   build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -  I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -  I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -   D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c   /tmp/pear/temp/amqp/amqp_exchange.c  -fPIC -DPIC -o .libs/amqp_exchange.o
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc  -I.  -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp- 1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp -  I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_CONFIG_H  -g -O2   -c  /tmp/pear/temp/amqp/amqp_queue.c -o amqp_queue.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -   I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -  I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -   D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c            /tmp/pear/temp/amqp/amqp_queue.c  -fPIC -DPIC -o .libs/amqp_queue.o
/tmp/pear/temp/amqp/amqp_queue.c: In function 'read_message_from_channel':
/tmp/pear/temp/amqp/amqp_queue.c:316:11: error: 'AMQP_FIELD_KIND_U64' undeclared (first use in this function)
/tmp/pear/temp/amqp/amqp_queue.c:316:11: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/amqp/amqp_queue.c: In function 'zim_amqp_queue_class_nack':
/tmp/pear/temp/amqp/amqp_queue.c:1020:2: error: unknown type name 'amqp_basic_nack_t'
/tmp/pear/temp/amqp/amqp_queue.c:1039:3: error: request for member 'delivery_tag' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1040:3: error: request for member 'multiple' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1041:3: error: request for member 'requeue' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1046:3: error: 'AMQP_BASIC_NACK_METHOD' undeclared     (first use in this function)
make: *** [amqp_queue.lo] Error 1
ERROR: `make' failed

推荐答案

看起来 PECL 扩展比您已安装的库更新.直接从他们的网站安装 RabbitMQ,使用他们的包而不是你的发行版附带的包,因为它们似乎已经过时了.

It looks like the PECL extension is newer than the the libraries that you have got installed. Install RabbitMQ directly from the their website, using their packages and not the ones that have come with your distribution as they seems to be out of date.

这篇关于通过 PECL 安装 AMQP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆