PECL Won’t Install OAuth on Debian

Recently had a problem install Oauth on a Debian server via the PECL manager. Here’s error and solution:

The error:

**snip**
running: make
/bin/sh /var/tmp/pear-build-root/oauth-1.0.0/libtool --mode=compile gcc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/var/tmp/pear-build-root/oauth-1.0.0/include -I/var/tmp/pear-build-root/oauth-1.0.0/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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -o oauth.lo
mkdir .libs
gcc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/var/tmp/pear-build-root/oauth-1.0.0/include -I/var/tmp/pear-build-root/oauth-1.0.0/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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -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,
from /tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /tmp/pear/temp/oauth/php_oauth.h:47,
from /tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php5/ext/pcre/php_pcre.h:45: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
/usr/include/php5/ext/pcre/php_pcre.h:46: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
/usr/include/php5/ext/pcre/php_pcre.h:52: error: expected specifier-qualifier-list before âpcreâ
make: *** [oauth.lo] Error 1
ERROR: `make' failed

The solution:
Needed to install libpcre3-dev (Perl 5 Compatible Regular Expression Library – development files) before PECL would make.

aptitude install libpcre3-dev

Tried PECL again, and it worked!

pecl install oauth


Comments are closed.