I try to get Xdebug ready on my Mac to use for PHP development, I inputed the output of phpinfo() in the official Wizard and followed the instructions. phpize worked, running ./configure also works, but I'm stuck at the make command which outputs:
Makefile:230: warning: overriding commands for target `test'
Makefile:134: warning: ignoring old commands for target `test'
/bin/sh ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/libtool --mode=compile cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -o xdebug.lo
mkdir .libs
cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -fno-common -DPIC -o .libs/xdebug.o
~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c:25:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [xdebug.lo] Error 1
I tried to install the php-dev package through brew, but it does not exist. How to fix this issue?
It is because OSX doesn't install the PHP headers that extensions require when they are being compiled. I think you're using the OSX provided PHP.
You should instead use homebrew to install PHP, which would also install the headers, and then you can install Xdebug (and other extensions).
There are excellent instructions in this answer.
I tried to install the gnupg yet I seem to keep getting the same error. I am using my MAC to install gnup so encode a file. I'm using PECL to install
pecl install gnupg
Yet I get the following error:
/bin/sh /op/gnupg-1.4.0/libtool --mode=compile cc -I. -I/opt/gnupg-1.4.0 -DPHP_ATOM_INC -I/opt/gnupg-1.4.0/include -I/opt/gnupg-1.4.0/main -I/opt/gnupg-1.4.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /opt/gnupg-1.4.0/gnupg.c -o gnupg.lo
mkdir .libs
cc -I. -I/
opt/gnupg-1.4.0 -DPHP_ATOM_INC -I/opt/gnupg-1.4.0/include -I/opt/gnupg-1.4.0/main -I/opt/gnupg-1.4.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /opt/gnupg-1.4.0/gnupg.c -fno-common -DPIC -o .libs/gnupg.o
/opt/gnupg-1.4.0/gnupg.c:21:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
I have installed the previous packages using the commands:
brew install gpg
brew install gpgme
I have even tried to download and manually make the extension but I still get the same error.
I had used the instructions from this question.
Does anyone have any ideas about what the issue is?
I'm trying to install php amqp according to this answer https://stackoverflow.com/a/9997263/2271028
but at the make command i see following:
/bin/bash /var/www/rabbitmq-c/amqp-1.4.0/libtool --mode=compile cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -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 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -o amqp.lo
libtool: compile: cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -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 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -fPIC -DPIC -o .libs/amqp.o
In file included from /var/www/rabbitmq-c/amqp-1.4.0/amqp.c:46:0:
/var/www/rabbitmq-c/amqp-1.4.0/php_amqp.h:303:2: error: unknown type name 'amqp_socket_t'
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c: In function 'amqp_error':
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c:616:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat]
make: *** [amqp.lo] Error 1
I see that there is some trouble with make, but can not resolve this problem.
Any ideas?
Thanks.
After some magic tryies i decided to install rabbitmq1 instead of rabbitmq0 that i can see in
aptitude search rabbitmq
command on my ubuntu 12.04 server.
i've manually installed
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq-dev_0.4.1-1_amd64.deb
and
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq1_0.4.1-1_amd64.deb
and after that again repeated actions from https://stackoverflow.com/a/9997263/2271028
It helps!
I got some serious error while installing expect extension in PHP.
I ran sudo pecl install channel://pecl.php.net/expect-0.3.1
I got error like this while running make,
running: make
/bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool --mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -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 -c /tmp/pear/temp/expect/expect.c -o expect.lo
libtool: compile: cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -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 -c /tmp/pear/temp/expect/expect.c -fPIC -DPIC -o .libs/expect.o
In file included from /tmp/pear/temp/expect/expect.c:21:0:
/tmp/pear/temp/expect/php_expect.h:33:17: fatal error: tcl.h: No such file or directory
compilation terminated.
make: *** [expect.lo] Error 1
ERROR: `make' failed
Please advice me as I am a very beginner in PHP.
Thanks.
I found this post helpful for this issue. On CentOS I was able to get this installed via:
yum install tcl tcl-devel tk tk-devel
yum install expect expect-devel
pecl install channel://pecl.php.net/expect-0.3.1
Then add the following to php.ini:
extension = expect.so
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/