• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved OAUTH extension for PHP 7, Couldn't find pcre.h

Jack Lee

New Pleskian
/opt/plesk/php/7.0/bin/pecl install oauth-2.0.2
error: Can't find PHP headers in /usr/include/php
Solved by reading these forums and running (thank you IGOR)
yum install make plesk-php70-devel gcc glibc-devel zlib-devel

So re-run:
/opt/plesk/php/7.0/bin/pecl install oauth-2.0.2

Log has error, see below:

downloading oauth-2.0.2.tgz ...
Starting to download oauth-2.0.2.tgz (49,115 bytes)
.............done: 49,115 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
building in /tmp/pear-build-rootC28R5Q/oauth-2.0.2
running: /tmp/oauth/configure --with-php-config=/opt/plesk/php/7.0/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/plesk/php/7.0
checking for PHP includes... -I/opt/plesk/php/7.0/include/php -I/opt/plesk/php/7.0/include/php/main -I/opt/plesk/php/7.0/include/php/TSRM -I/opt/plesk/php/7.0/include/php/Zend -I/opt/plesk/php/7.0/include/php/ext -I/opt/plesk/php/7.0/include/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/7.0/lib64/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/7.0/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for oauth support... yes, shared
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
configure: error: Couldn't find pcre.h, try installing the libpcre development/headers package
ERROR: `/tmp/oauth/configure --with-php-config=/opt/plesk/php/7.0/bin/php-config' failed

 
Back
Top