本文介绍了如何在ubuntu中安装php amqp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 php 安装 amqp(将 PHP 与 RabbitMQ 集成)使用这个 http://code.google.com/p/php-amqp/.

I am try to install amqp for php (Integrating PHP with RabbitMQ)using this http://code.google.com/p/php-amqp/.

运行后phpize &&./configure --with-amqp &&制作&&须藤制作安装

after runphpize && ./configure --with-amqp && make && sudo make install

它给出这样的错误

找不到 config.m4.确保在模块的顶级源目录中运行'/usr/bin/phpize'

请帮帮我,我的环境是ubuntu

Please help me, my environment is ubuntu

推荐答案

您需要从这里下载 PHP 库的代码:http://code.google.com/p/php-amqp/downloads/list

You need to download the code for the PHP library from here: http://code.google.com/p/php-amqp/downloads/list

然后 cd 进入该文件夹并运行他们告诉您运行的命令.

Then cd into that folder and run the command they tell you to run.

更新:那个页面实际上是一个旧页面,他们已经很长时间没有更新了.您可以从 http://pecl.php.net/get/amqp 获取最新的 amqp:

UPDATE: That page is actually an old page, they haven't updated it in a long time. You can grab the latest amqp from http://pecl.php.net/get/amqp:

wget http://pecl.php.net/get/amqp -O amqp.tar.gz
tar -zxvf amqp.tar.gz
cd amqp-1.0.7    # replace this with the current version
phpize
./configure --with-amqp
make
sudo make install

然后您需要将以下行添加到您的 php.ini 文件中:

Then you'll need to add the following line to your php.ini file:

extension=amqp.so

这篇关于如何在ubuntu中安装php amqp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 05:53