php 安裝rabtmq amqp 擴展

<p><strong>php 安裝 rabbitmq-c-0.9.0 擴展</strong></p> <ol><li> <p>安裝 ibrabbitmq-c<br> github 倉庫地址<br><a href="https://github.com/alanxz/rabbitmq-c" rel="nofollow noreferrer">https://github.com/alanxz/rab...</a></p>php

安裝過程若是報錯
[ 87%] Built target amqp-get

<p>Scanning dependencies of target amqp-publish <br> [ 88%] Building C object tools/CMakeFiles/amqp-publish.dir/publish.c.o <br> /home/mpay/software/rabbitmq-c-master/tools/publish.c: 在函數‘main’中: <br> /home/mpay/software/rabbitmq-c-master/tools/publish.c:87:23: 錯誤:‘POPT_ARG_ARGV’未聲明(在此函數內第一次使用)</p>git

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

<p>/home/mpay/software/rabbitmq-c-master/tools/publish.c:87:23: 附註:每一個未聲明的標識符在其出現的函數內只報告一次 <br> gmake[2]: <em>*</em> [tools/CMakeFiles/amqp-publish.dir/publish.c.o] 錯誤 1 <br> gmake[1]: <em>*</em> [tools/CMakeFiles/amqp-publish.dir/all] 錯誤 2 <br> gmake: <em>*</em> [all] 錯誤 2 </p> <p>打開 <a href="http://freshmeat.sourceforge.net/projects/popt" rel="nofollow noreferrer">http://freshmeat.sourceforge....</a> 下載安裝 popt</p> <p>從新編譯ibrabbitmq-c</p> <p>mkdir build &amp;&amp; cd build<br> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/librabbitmq ..<br> make &amp;&amp; make install </p> <p>ln -s /usr/local/librabbitmq/lib64 /usr/local/librabbitmq/lib</p> </li></ol> <p>2.pecl install amqp</p>github

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

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

<p>3.配置php.ini</p>segmentfault

extension=amqp.so

<p>4.php-fpm reload</p>函數

原文地址:http://www.javashuo.com/article/p-ugvwwbxw-ep.htmlphp-fpm

相關文章
相關標籤/搜索