Problem installing mongodb, dockerfile using php:8.0.10-alpine image
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserdIJeIa/mongodb-1.10.0/libtool --mode=compile cc -Isrc/libmongoc/src/common/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/tmp/pear/temp/pear-build-defaultuserdIJeIa/mongodb-1.10.0/include -I/tmp/pear/temp/pear-build-defaultuserdIJeIa/mongodb-1.10.0/main -I/tmp/pear/temp/mongodb -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/mongodb/src/libmongoc/src/common/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/tmp/pear/temp/mongodb/src/libmongoc/src/libmongoc/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt/kms-message/src/ -I/tmp/pear/temp/mongodb/src/libmongocrypt-compat/ -I/tmp/pear/temp/mongodb/src/BSON/ -I/tmp/pear/temp/mongodb/src/MongoDB/ -I/tmp/pear/temp/mongodb/src/MongoDB/Exception/ -
I/tmp/pear/temp/mongodb/src/MongoDB/Monitoring/ -I/tmp/pear/temp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -DBSON_COMPILATION -DMONGOC_COMPILATION -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_LIBCRYPTO=1 -c /tmp/pear/temp/mongodb/src/libmongoc/src/common/common-b64.c -o src/libmongoc/src/common/common-b64.lo
make: /bin/sh: Operation not permitted
make: *** [Makefile:277: src/libmongoc/src/common/common-b64.lo] Error 127
Dockerfile
FROM php:8.0.10-alpine && \
pecl install mongodb \
pecl clear-cache \
&& \
echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/mongodb.ini; \
Related
i'm building docker images PHP 7.4 enable grpc:
errors build:
...
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/libtool --mode=compile g++ -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"PHP"' -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"1.44.0"' -I. -I/tmp/pear/temp/grpc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/include -I/tmp/pear/temp/pear-build-defaultuserkjkape/grpc-1.44.0/main -I/tmp/pear/temp/grpc -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/grpc/include -I/tmp/pear/temp/grpc/src/core/ext/upb-generated -I/tmp/pear/temp/grpc/src/core/ext/upbdefs-generated -I/tmp/pear/temp/grpc/src/php/ext/grpc -I/tmp/pear/temp/grpc/third_party/abseil-cpp -I/tmp/pear/temp/grpc/third_party/address_sorting/include -I/tmp/pear/tem
p/grpc/third_party/boringssl-with-bazel/src/include -I/tmp/pear/temp/grpc/third_party/re2 -I/tmp/pear/temp/grpc/third_party/upb -I/tmp/pear/temp/grpc/third_party/xxhash -DHAVE_CONFIG_H -std=c++11 -fno-exceptions -fno-rtti -g -O2 -c /tmp/pear/temp/grpc/src/core/ext/filters/census/grpc_context.cc -o src/core/ext/filters/census/grpc_context.lo
make: /bin/sh: Operation not permitted
make: *** [Makefile:192: src/core/ext/filters/census/grpc_context.lo] Error 127
ERROR: `make' failed
The command '/bin/sh -c echo starting && apk update && pecl install grpc && pecl install protobuf && docker-php-ext-enable grpc && docker-php-ext-enable protobuf' returned a non-zero code: 1
i'm using php:7.4.28-fpm-alpine3.15
in my dockerfile, i added:
...
# Enable extensions
RUN echo starting && \
apk update && \
pecl install grpc && \
pecl install protobuf && \
docker-php-ext-enable grpc && \
docker-php-ext-enable protobuf
...
How can i fix it?
Thanks for your support!
I fixed it.
Solution, just update docker: https://docs.docker.com/engine/install/ubuntu/
Please I am trying to compile gd with webp on azure web app
apt-get update && apt-get install -y libwebp-dev && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr && docker-php-ext-install gd
And i am getting this error , I tested it on 7.3 and it is working good
/bin/bash /usr/src/php/ext/gd/libtool --mode=compile cc -I/usr/src/php/ext/gd/libgd -I. -I/usr/src/php/ext/gd -DPHP_ATOM_INC -I/usr/src/php
/ext/gd/include -I/usr/src/php/ext/gd/main -I/usr/src/php/ext/gd -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/includ
e/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libpng16 -fstac
k-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_
LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/gd/libgd/gd.c -o libgd/gd.lo
/usr/src/php/ext/gd/libtool: line 1283: libgd/gd.loT: No such file or directory
mkdir libgd/.libs
mkdir: cannot create directory 'libgd/.libs': No such file or directory
make: *** [Makefile:197: libgd/gd.lo] Error 1
I'm trying to build PHP 5.6.17 from source on FreeBSD 10 with libmcrypt-2.5.8 enabled, as per http://php.net/manual/en/mcrypt.requirements.php . The libmcrypt build seems to go OK using make EXTRACFLAGS=-fPIC :
root#dev% dir /usr/local/lib/*mcry*
-rw-r--r-- 1 root wheel 1033370 Jan 14 11:30 /usr/local/lib/libmcrypt.a
-rwxr-xr-x 1 root wheel 746 Jan 14 11:30 /usr/local/lib/libmcrypt.la
After :
./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/etc \
--enable-bcmath --without-cdb \
--with-gd --with-mysql=/usr/local/mysql \
--without-iodbc --enable-inline-optimization \
--without-gdbm --with-ndbm --without-db2 \
--without-dbm --without-readline --without-recode \
--with-openssl --without-db3 --enable-dba \
--with-curl --with-jpeg-dir=/usr/local/lib --enable-calendar \
--with-mhash --enable-mbstring=all --with-png-dir=/usr/local/libpng \
--with-zlib --with-freetype-dir=/usr/local/lib \
--with-pdo-mysql=mysqlnd --enable-exif --with-libxml-dir=/usr/local/lib \
--enable-zip \
--with-imap=/usr/local/imap-2007f \
--with-mcrypt
Configure output relating to mcrypt:
checking for mcrypt support... yes
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... no
checking for mcrypt_module_open in -lmcrypt... yes
I get this error when I 'make'
/usr/bin/ld: /usr/local/lib/libmcrypt.a(mcrypt_extra.o): relocation R_X86_64_32 against `mps' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmcrypt.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make: stopped in /usr/local/dev_build_sources/php-5.6.17
I've previously been able to build using these steps in PHP 5.6.6
This question https://serverfault.com/questions/357020/how-can-i-install-enable-mcrypt-without-re-installing-php suggested making mcrypt (why not libmcrypt?) an extension, but the mcrypt make kept failing
EDIT - adding in result of trying to make the extension in php-5.6.17/ext/mcrypt it seems to fail saying it needs the -fPI flags, but they were already supplied..
root#dev% make EXTRACFLAGS=-fPIC
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=compile cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt.c -o mcrypt.lo
mkdir .libs
cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt.c -fPIC -DPIC -o .libs/mcrypt.o
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=compile cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c -o mcrypt_filter.lo
cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c -fPIC -DPIC -o .libs/mcrypt_filter.o
/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c:210:37: warning: passing 'const char *' to
parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
mcrypt_module = mcrypt_module_open(cipher, algo_dir, mode, mode_dir);
^~~~~~
/usr/local/include/mutils/mcrypt.h:38:34: note: passing argument to parameter 'algorithm' here
MCRYPT mcrypt_module_open(char *algorithm,
^
1 warning generated.
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -o ./mcrypt.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/modules mcrypt.lo mcrypt_filter.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lmcrypt
cc -shared .libs/mcrypt.o .libs/mcrypt_filter.o -L/usr/local/lib /usr/local/lib/libmcrypt.a -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,mcrypt.so -o ./.libs/mcrypt.so
/usr/bin/ld: /usr/local/lib/libmcrypt.a(mcrypt_extra.o): relocation R_X86_64_32 against `mps' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmcrypt.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Got it working:
In the libmcrypt-2.5.8 source directory
./configure --disable-posix-threads --with-pic
Then make without any flags
PHP build went fine with above configure command and a plain make
I am attempting to install OAuth on Ubuntu Server 12.04 but getting errors. I am following this tutorial but something isn't lining up:
http://sergiopvilar.wordpress.com/2013/05/18/how-to-install-php-oauth-extension/
Command I am running in terminal:
sudo pecl install oauth
Last portion of error I am getting response (because it returns several pages of response):
running: make
/bin/bash /tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -o oauth.lo
libtool: compile: cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -fPIC -DPIC -o .libs/oauth.o
In file included from /tmp/pear/temp/oauth/php_oauth.h:47:0,
from /tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [oauth.lo] Error 1
ERROR: `make' failed
Make is installed and working. Any advice?
Found it, I needed to install PCRE Library ( Perl 5 Compatible Regular Expression Library ).
# apt-get update
# apt-get install libpcre3 libpcre3-dev
This worked for me.
Try This
apt-get update
apt-get install libpcre3 libpcre3-dev
sudo pecl install mongodb
I'm trying to install the RabbitMQ PECL extension but after running
sudo pecl install amqp
I get the following cryptic error message, which extensive googling hasn't helped resolve.
I have these packages installed:
librabbitmq - RabbitMQ C client itself)
librabbitmq-dev - dev headers etc.
and RabbitMQ running successfully on localhost
Maybe it could be a mismatch in the version of the C client and what the PECL extension expects, anybody else come across this one?
Make output below....
Cheers
running: make
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp- 1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp - I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp.c -o amqp.lo
libtool: compile: cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear- build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main - I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp.c -fPIC -DPIC -o .libs/amqp.o
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp- 1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp - I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_exchange.c -o amqp_exchange.lo
libtool: compile: cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear- build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main - I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_exchange.c -fPIC -DPIC -o .libs/amqp_exchange.o
/bin/bash /tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp- 1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main -I/tmp/pear/temp/amqp - I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_queue.c -o amqp_queue.lo
libtool: compile: cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/include -I/tmp/pear/temp/pear-build-rootZNUmac/amqp-1.0.0/main - I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM - I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_queue.c -fPIC -DPIC -o .libs/amqp_queue.o
/tmp/pear/temp/amqp/amqp_queue.c: In function 'read_message_from_channel':
/tmp/pear/temp/amqp/amqp_queue.c:316:11: error: 'AMQP_FIELD_KIND_U64' undeclared (first use in this function)
/tmp/pear/temp/amqp/amqp_queue.c:316:11: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/amqp/amqp_queue.c: In function 'zim_amqp_queue_class_nack':
/tmp/pear/temp/amqp/amqp_queue.c:1020:2: error: unknown type name 'amqp_basic_nack_t'
/tmp/pear/temp/amqp/amqp_queue.c:1039:3: error: request for member 'delivery_tag' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1040:3: error: request for member 'multiple' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1041:3: error: request for member 'requeue' in something not a structure or union
/tmp/pear/temp/amqp/amqp_queue.c:1046:3: error: 'AMQP_BASIC_NACK_METHOD' undeclared (first use in this function)
make: *** [amqp_queue.lo] Error 1
ERROR: `make' failed
I had to install it applying following steps found here:
# Download the rabbitmq-c library # version 0-9-1
git clone git://github.com/alanxz/rabbitmq-c.git
cd rabbitmq-c
# Enable and update the codegen git submodule
git submodule init
git submodule update
# Configure, compile and install
autoreconf -i && ./configure && make && sudo make install
After that, sudo pecl install amqp did the work.
Using Ubuntu 12.10 with PHP 5.4.3.
this is what I did to install it successfully on debian wheezy:
apt-get install pkg-config librabbitmq-dev librabbitmq0
git clone https://github.com/alanxz/rabbitmq-c
cd rabbitmq-c/
autoreconf -i
./configure
make
make install
pecl install amqp
It looks like the PECL extension is newer than the the libraries that you have got installed.
Install RabbitMQ directly from the their website, using their packages and not the ones that have come with your distribution as they seems to be out of date.
The dev lib from repo is broken (as usually....). You have to clone (from GIT or HG) and make the lib, from php.net :
hg clone http://hg.rabbitmq.com/rabbitmq-c/rev/b01825ecc112 rabbitmq-c
cd rabbitmq-c
# Add the codegen requirement. To find the full list, go here: http://hg.rabbitmq.com/rabbitmq-codegen/tags
# and copy the URL for the appropriate broker version.
hg clone http://hg.rabbitmq.com/rabbitmq-codegen/rev/16bbcb711380 codegen
# Configure, compile and install
autoreconf -i && ./configure && make && sudo make install
Then run "pecl install amqp", worked in my ubuntu 12 with Php 5.3
This is what I did to install it successfully on debian wheezy: I had to use version 0.5.2 of rabbitmq-c
git clone https://github.com/alanxz/rabbitmq-c
cd rabbitmq-c
git checkout tags/v0.5.2
git submodule init
git submodule update
autoreconf -i && ./configure && make && make install
pecl install amqp
This is because your rabbitmq is older than the version the php extension requires.
You can install newer version of rabbitmq or lower version of the extension like:
pecl install amqp-1.2.0
But I think using latest versions is better choice.
Installing rabbitmq's AMQP with pecl with PHP7.0
Just follow few these steps, this will install all its dependencies and amqp library. It works for me with bento/ubuntu-16.04 with php7.0
apt-get update
wget http://in.archive.ubuntu.com/ubuntu/ubuntu/pool/universe/libr/librabbitmq/librabbitmq1_0.5.2-2_amd64.deb
dpkg -i librabbitmq1_0.5.2-2_amd64.deb
wget http://in.archive.ubuntu.com/ubuntu/ubuntu/pool/universe/libr/librabbitmq/librabbitmq-dev_0.5.2-2_amd64.deb
dpkg -i librabbitmq-dev_0.5.2-2_amd64.deb
apt-get install php7.0 php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-xml php7.0-dev
pecl install amqp
echo "extension=amqp.so" >> /etc/php/7.0/cli/php.ini
echo "extension=amqp.so" >> /etc/php/7.0/fpm/php.ini
Librabbitmq-dev and its dependencies of different versions it can be downloaded from
http://in.archive.ubuntu.com/ubuntu/ubuntu/pool/universe/libr/librabbitmq/