Skip to content


Install PECL AMQP Extension for PHP on Centos 6

I ran into some issues recently getting the AMQP PECL extension running on my CentOS box. Find a quick explanation below on how to go about getting it working.

1. Download rabbitmq-c client library from https://github.com/alanxz/rabbitmq-c

git clone git://github.com/alanxz/rabbitmq-c.git
cd rabbitmq-c
git submodule init
git submodule update

2. Install the library

cd rabbitmq-c
autoreconf -i

If you receive error:

configure.ac:34: installing `./config.guess'
configure.ac:34: installing `./config.sub'
configure.ac:18: installing `./install-sh'
configure.ac:18: installing `./missing'
Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
Makefile.am:3:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
Makefile.am:3:   to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am:3:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
Makefile.am:3:   its definition is in aclocal's search path.
Makefile.am: installing `./depcomp'
autoreconf: automake failed with exit status: 1

You will need to install lib tools and try again:

yum install libtools

Run make and make install

make
make install

Now we need to install AMQP from pecl

pecl install AMQP

This will create an amqp.so shared object that needs to be included in your php.ini file. Find the extensions portal of the ini and add “extension=amqp.so”.

Posted in RabbitMQ.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.