how to install php amqp in ubuntu how to install php amqp in ubuntu php php

how to install php amqp in ubuntu


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

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

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.gztar -zxvf amqp.tar.gzcd amqp-1.0.7    # replace this with the current versionphpize./configure --with-amqpmakesudo make install

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

extension=amqp.so


Let's make life easier, follow these 2 steps, and that's all:

  1. apt install php7.4-amqp (it depends on your php version)
  2. Then add under the path of php.ini the following line extension = 'amqp.so'


You are missing the required libraries and tools to compile a PHP extension.

On Debian/Ubuntu you can get them with:

sudo apt-get install php5-dev