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!
Related
I was trying to compile the mysqlnd_qc but failed.
I'm running Ubuntu 14.04.1 and have installed PHP 5.6.5 from the launchpad repository https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6 . I have also installed libmemcached-dev in order to enable the memcached feature of mysqlnd_qc.
Here're the commands I used:
phpize
./configure --enable-mysqlnd-qc --enable-mysqlnd-qc-memcache --enable-shared
make
Nothing wrong when configuring but failed to compile:
/bin/bash /home/frederick/mysqlnd_qc-1.2.0/libtool --mode=compile cc -I. -I/home/frederick/mysqlnd_qc-1.2.0 -DPHP_ATOM_INC -I/home/frederick/mysqlnd_qc-1.2.0/include -I/home/frederick/mysqlnd_qc-1.2.0/main -I/home/frederick/mysqlnd_qc-1.2.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 /home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c -o mysqlnd_qc.lo
libtool: compile: cc -I. -I/home/frederick/mysqlnd_qc-1.2.0 -DPHP_ATOM_INC -I/home/frederick/mysqlnd_qc-1.2.0/include -I/home/frederick/mysqlnd_qc-1.2.0/main -I/home/frederick/mysqlnd_qc-1.2.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 /home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c -fPIC -DPIC -o .libs/mysqlnd_qc.o
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'php_mysqlnd_qc_store_result_pub':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:624:3: error: too few arguments to function 'qc_orig_mysqlnd_conn_methods->store_result'
result = QC_CALL_ORIGINAL_CONN_DATA_METHOD(store_result)(conn TSRMLS_CC);
^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'php_mysqlnd_qc_use_result_pub':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:786:2: error: too few arguments to function 'qc_orig_mysqlnd_conn_methods->use_result'
ret = QC_CALL_ORIGINAL_CONN_DATA_METHOD(use_result)(conn TSRMLS_CC);
^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c: In function 'mysqlnd_qc_register_hooks':
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:882:39: warning: assignment from incompatible pointer type [enabled by default]
my_mysqlnd_conn_methods.store_result = MYSQLND_METHOD(mysqlnd_qc, store_result);
^
/home/frederick/mysqlnd_qc-1.2.0/mysqlnd_qc.c:884:37: warning: assignment from incompatible pointer type [enabled by default]
my_mysqlnd_conn_methods.use_result = MYSQLND_METHOD(mysqlnd_qc, use_result);
^
make: *** [mysqlnd_qc.lo] Error 1
I tried to compile the stable version but also failed. What's going wrong? Please help me, thanks!
The mysqlnd_qc-1.2.0 doesn't compatible with the PHP 5.6
You can use the latest source code on the trunk.
http://svn.php.net/viewvc/pecl/mysqlnd_qc/trunk/
Their change logs.
https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20140317/1210988.html
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
Im having hard time install tcpwrap using pecl install and also tried manual install its giving me the following error on make. I appreciate any help on how to install tcpwrap properly.
running: make
/bin/sh /root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/libtool --mode=compile cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -o tcpwrap.lo
mkdir .libs
cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -fPIC -DPIC -o .libs/tcpwrap.o
/root/tmp/pear/tcpwrap/tcpwrap.c:42: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtcpwrap_functionsâ
/root/tmp/pear/tcpwrap/tcpwrap.c:55: error: âtcpwrap_functionsâ undeclared here (not in a function)
make: *** [tcpwrap.lo] Error 1
ERROR: `make' failed
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 tried many tutorials on how to install PDO_OCI on my openSuse 11.4 64bit machine and I couldn't get it to work.
What I do is:
wget http://pecl.php.net/get/PDO_OCI
tar -xzvf PDO_OCI-1.0.tgz
cd PDO_OCI-1.0/
phpize
and I get this output:
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
Despite the warnings I run:
./configure --with-pdo-oci
and it goes fine.
Then I run make and it stops:
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
mkdir .libs
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -fPIC -DPIC -o .libs/pdo_oci.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -o oci_driver.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -fPIC -DPIC -o .libs/oci_driver.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -o oci_statement.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -fPIC -DPIC -o .libs/oci_statement.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=link gcc -std=gnu99 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.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 -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -o pdo_oci.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/modules pdo_oci.lo oci_driver.lo oci_statement.lo -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh
gcc -std=gnu99 -shared .libs/pdo_oci.o .libs/oci_driver.o .libs/oci_statement.o -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh -Wl,-rpath -Wl,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -Wl,-soname -Wl,pdo_oci.so -o .libs/pdo_oci.so
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib/libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [pdo_oci.la] Error 1
Any help is appreciated.
Have you tried either installing via. Yast (best option) or pecl (pecl install PDO_OCI)?
I patched config.m4 as follows:
--- config.m4.orig 2012-11-26 11:04:49.237538293 -0500
+++ config.m4 2012-11-26 11:31:35.693839416 -0500
## -208,15 +208,15 ##
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
- ifdef([PHP_CHECK_PDO_INCLUDES],
+ ifdef([PHP_CHECK_PDO_INCLUDES_CV],
[
- PHP_CHECK_PDO_INCLUDES
+ PHP_CHECK_PDO_INCLUDES_CV
],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
- elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
+ elif test -f $abs_srcdir/../pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/../../ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php/ext
else
Then invoked in php5-5.3.10/ext/pdo_oci:
autoconf -f
./configure
cp /usr/include/oracle/11.1.0.1/client64/* include/
make
Here is a relevant bug report.