php 安装rabtmq amqp 扩展

php 安装 rabbitmq-c-0.9.0 扩展php

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

    安装过程若是报错
    [ 87%] Built target amqp-get

    Scanning dependencies of target amqp-publish
    [ 88%] Building C object tools/CMakeFiles/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’未声明(在此函数内第一次使用)github

    {"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.... 下载安装 poptphp-fpm

    从新编译ibrabbitmq-cui

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

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

2.pecl install amqprabbitmq

若是出现
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.inici

extension=amqp.so

4.php-fpm reload

相关文章
相关标签/搜索