PHP installation AMQP extension has an LIBRABBITMQ error

Source: Internet
Author: User
Tags rabbitmq
Because you want to go to the message queue, you need to install the AMPQ extension locally, and in the process of loading, the following error is reported:


Configure:error:Please Reinstall the LIBRABBITMQ distribution itself or (re) install LIBRABBITMQ development Package if I T available in your system

Looking over the network, the following article is the perfect solution to my problem, reproduced in this copy of a spare.

The reason for this error is that because there is no AMQP dependent package rabbitmq-c installed, you need to install Rabbitmq-c first.

1. Installing rabbitmq-c-0.7.1

No installation will prompt the above error
I chose the latest version of 0.7.1


wget Https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gztar ZXF rabbitmq-c-0.7.1.tar.gz CD rabbitmq-c-0.7.1./configure--prefix=/usr/local/rabbitmq-c-0.7.1make && make Install

After success, see the following interface

2. Installing AMQP

My choice is 1.6.1.


wget https://pecl.php.net/get/amqp-1.6.1.tgztar zxf amqp-1.6.1.tgzcd amqp-1.6.1/usr/local/php/bin/phpize. Configure--with-php-config=/usr/local/php/bin/php-config--WITH-AMQP--with-librabbitmq-dir=/usr/local/ rabbitmq-c-0.7.1

Note: This is the /usr/local/rabbitmq-c-0.7.1 rabbitmq-c same as the address installed above


Make && make install

The following address is logged after the installation is successful, and it is useful to configure the PHP module to be added

3. Add a PHP module


Vi/usr/local/php/etc/php.ini

Add a row last


Extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/amqp.so

Restart PHP


Service PHP-FPM Restart

4. Check for AMQP installation

Use Phpinfo to check if AMQP is installed successfully

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.