php8安装amqp扩展
1.安装rabbitmq-c
#下载源码
wget https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.11.0.tar.gz
#解压
tar -zxvf v0.11.0.tar.gz
#进人目录
cd rabbitmq-c-0.11.0
#创建编译目录
mkdir build
#进人编译目录
cd build
#cmake指定安装路径
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/rabbitmq-c-0.11.0 ..
#执行 make 操作
make -j && make install
2.安装php-amqp
#源码下载
wget https://github.com/php-amqp/php-amqp/archive/refs/tags/v1.11.0.tar.gz
#解压
tar -zxvf v1.11.0.tar.gz
#进人目录
cd php-amqp-1.11.0
#执行phpize
/usr/local/bin/phpize #看到PHP Api Version: 20210902 说明支持PHP8
#编译参数
./configure --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.11.0/ --with-php-config=/usr/local/bin/php-config
#执行make
make && make install
标签:php,amqp,tar,make,扩展,gz,rabbitmq,PHP
From: https://www.cnblogs.com/pengb/p/16993827.html