Skip to content

Instantly share code, notes, and snippets.

@notFloran
Last active March 26, 2016 21:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save notFloran/6c73739fcc0b07e9c665 to your computer and use it in GitHub Desktop.
Save notFloran/6c73739fcc0b07e9c665 to your computer and use it in GitHub Desktop.
Install amqp extension for php - Debian 7
#!/bin/sh
apt-get install php5-dev make cmake php-pear
git clone git://github.com/alanxz/rabbitmq-c.git && cd rabbitmq-c
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . --target install
ln -s /usr/local/lib/x86_64-linux-gnu/librabbitmq.so /usr/local/lib/librabbitmq.so
ln -s /usr/local/lib/x86_64-linux-gnu/librabbitmq.so.1 /usr/local/lib/librabbitmq.so.1
pecl install amqp
echo 'extension=amqp.so' >> /etc/php5/conf.d/20-amqp.ini
@thiagooak
Copy link

use cmake --build . --config Release --target install

and you do not need to do the ln -s ...

@ryanatearth
Copy link

I have been following these directions and several others I have found on the web. I keep getting stuck when installing the amqp libraries with these errors:

`
/mnt2/tmp/pear/temp/amqp/amqp_exchange.c: In function ‘zim_amqp_exchange_class_declareExchange’:
/mnt2/tmp/pear/temp/amqp/amqp_exchange.c:515:2: error: incompatible type for argument 7 of ‘amqp_exchange_declare’

);
^
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment