Erro ao instalar a extensão php OAuth via pecl

2

Estou tentando instalar a extensão php OAuth no meu ambiente local. php.net sugere que é super fácil. Você acabou de executar pecl install oauth . Eu tentei isso, e aqui está a saída no terminal:

(Atualização: atualizei MacPorts de acordo com a sugestão e, desde então, removi o erro anterior que estava recebendo. Este é um novo erro)

downloading oauth-1.0.0.tgz ...
Starting to download oauth-1.0.0.tgz (42,834 bytes)
............done: 42,834 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
building in /var/tmp/pear-build-root/oauth-1.0.0
running: /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/configure
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 for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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... i686-apple-darwin10.3.1
checking host system type... i686-apple-darwin10.3.1
checking target system type... i686-apple-darwin10.3.1
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/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... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for oauth support... yes, shared
checking for cURL in default path... found in /usr
checking for ld used by cc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
checking if cc static flag  works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -fno-rtti -fno-exceptions... rm: conftest.dSYM: is a directory
no
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the cc linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.3.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/oauth-1.0.0/libtool --mode=compile cc  -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/oauth-1.0.0/include -I/private/var/tmp/pear-build-root/oauth-1.0.0/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth -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  -DHAVE_CONFIG_H  -g -O2 -Wall -g   -c /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/oauth.c -o oauth.lo
mkdir .libs
 cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/oauth-1.0.0/include -I/private/var/tmp/pear-build-root/oauth-1.0.0/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth" -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 -DHAVE_CONFIG_H -g -O2 -Wall -g -c "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/oauth.c"  -fno-common -DPIC -o .libs/oauth.o
In file included from /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/php_oauth.h:47,
                 from /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/php_oauth.h:47,
                 from /private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
make: *** [oauth.lo] Error 1
ERROR: 'make' failed
    
por PJ. 15.06.2010 / 19:46

5 respostas

2

Você tem macports instalados? em caso afirmativo, faça um autoconf de instalação de porta que deve consertá-lo.

    
por 15.06.2010 / 20:14
3

Eu estava tendo o mesmo '' make failed ' problem and installing pcre' resolveu meu problema

apt-get install libpcre3-dev

    
por 02.10.2010 / 20:52
1

'/usr/include/php/exam/pcre/php_pcre.h: 29: 18: erro: pcre.h: não existe tal arquivo ou diretório'

Você está perdendo o arquivo de cabeçalho 'perl-compatible-regular-expression'. Por que você não instala o pacote de desenvolvimento para o pcre primeiro e depois tenta recompilar?

Não tenho certeza de como esse pacote é chamado no macports, no debian, por exemplo, ele é chamado de 'libpcre3-dev'.

-F

    
por 16.06.2010 / 15:21
0

Pegue o tarball correspondente do link que você instalou no seu sistema.

Extraia-o manualmente e copie o diretório ext / pcre para / usr / include / php / ext

Em seguida, tente reinstalar o oAuth via pecl.

    
por 27.07.2010 / 16:59
0

Eu estava tendo um problema parecido ao instalar a extensão Phar no PHP 5.2.6 no Centos 5.2 x64, e depois de ler isto os seguintes comandos funcionaram:

# fix 'noexec' permission on /tmp and /var/tmp
mkdir /root/tmp
chmod 777 /root/tmp
mount --bind /root/tmp /tmp
mount --bind /root/tmp /var/tmp

# get the required pcre source RPM
wget http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/pcre-devel-6.6-2.el5_1.7.i386.rpm
rpm -ivh pcre-devel-6.6-2.el5_1.7.i386.rpm

# install pecl extension
pecl install Phar
    
por 01.12.2010 / 21:58

Tags