php 安装rabtmq amqp 扩展

发布时间:2019-08-07 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php 安装rabtmq amqp 扩展脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

php 安装 rabbITmq-c-0.9.0 扩展

  1. 安装 ibrabbitmq-c
    github 仓库地址
    https://github.com/alanxz/rab...

    安装过程如果报错
    [ 87%] Built target amqp-get  

    Scanning dePEndencies of target amqp-publish
    [ 88%] Building C object tools/@R_156_1512@Files/amqp-publish.dir/publish.c.o
    /home/mpay/Software/rabbitmq-c-master/tools/publish.c: 在函数‘main’中:
    /home/mpay/software/rabbitmq-c-master/tools/publish.c:87:23: 错误:‘POPT_ARG_ARGV’未声明(在此函数内第一次使用)

          {"header", 'H', POPT_ARG_ARGV, &headers, 0,  
                          ^  

    /home/mpay/software/rabbitmq-c-master/tools/publish.c:87:23: 附注:每个未声明的标识符在其出现的函数内只报告一次
    gmake[2]: * [tools/CMakeFiles/amqp-publish.dir/publish.c.o] 错误 1
    gmake[1]: * [tools/CMakeFiles/amqp-publish.dir/all] 错误 2
    gmake: * [all] 错误 2

    打开 http://freshmeat.sourceforge.... 下载安装 popt

    重新编译ibrabbitmq-c

    mkdir build && cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local/librabbitmq ..
    make && make install

    ln -s /usr/local/librabbitmq/lib64 /usr/local/librabbitmq/lib

2.pecl install amqp

如果出现
hecking for amqp using pkg-config... configure: error: librabbitmq not found
ERROR: `/tmp/pear/temp/amqp/configure --with-librabbitmq-dir' failed

在提示位置 输入   /usr/local/librabbitmq

3.配置php.ini

extension=amqp.so

4.php-FPM reload

脚本宝典总结

以上是脚本宝典为你收集整理的php 安装rabtmq amqp 扩展全部内容,希望文章能够帮你解决php 安装rabtmq amqp 扩展所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。