Vous êtes ici

Block title

i class="icon icon icon search" aria-hidden="true"> Recherche

Block content
Block title
Block content

APC, erreur : 'apc_regex' has no member named 'nreg'

Erreur lors de l'installation de APC

Date de publication: 
lun, 04/04/2011 - 14:11
Dernière modification: 
mer, 08/20/2014 - 13:43
Auteur: 
david

Comment résoudre l'erreur "'apc_regex' has no member named 'nreg'" qui survient lors de la compilation de APC (Alternative PHP Cache) ?

APC ?

APC, "l'Alternative PHP Cache", est un système de cache (libre et gratuit), robuste permettant d'optimiser le code intermédiaire PHP aussi appelé "OPCode".
APC est activement maintenu dans PECL et offre non seulement un cache OPCode mais aussi un cache utilisateur...

L'erreur :

Une erreur {({{error: 'apc_regex' has no member named 'nreg'}})} de compilation survient lorsque l'on installe APC :

/bin/sh /var/tmp/pear-build-root/APC-3.1.5/libtool --mode=compile cc  -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-root/APC-3.1.5/include -I/var/tmp/pear-build-root/APC-3.1.5/main -I/var/tmp/APC -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   -c /var/tmp/APC/apc.c -o apc.lo
mkdir .libs
 cc -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-root/APC-3.1.5/include -I/var/tmp/pear-build-root/APC-3.1.5/main -I/var/tmp/APC -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 -c /var/tmp/APC/apc.c  -fPIC -DPIC -o .libs/apc.o
In file included from /var/tmp/APC/apc.c:44:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /var/tmp/APC/apc.c:44:
/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'
/var/tmp/APC/apc.c:369: error: expected specifier-qualifier-list before 'pcre'
/var/tmp/APC/apc.c: In function 'apc_regex_compile_array':
/var/tmp/APC/apc.c:430: error: 'apc_regex' has no member named 'preg'
/var/tmp/APC/apc.c:430: error: 'apc_regex' has no member named 'preg'
/var/tmp/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg'
/var/tmp/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg'
/var/tmp/APC/apc.c: In function 'apc_regex_match_array':
/var/tmp/APC/apc.c:463: error: 'apc_regex' has no member named 'preg'
/var/tmp/APC/apc.c:463: error: 'apc_regex' has no member named 'preg'
/var/tmp/APC/apc.c:464: error: 'apc_regex' has no member named 'nreg'
/var/tmp/APC/apc.c:464: error: 'apc_regex' has no member named 'nreg'
make: *** [apc.lo] Error 1
ERROR: `make' failed

Le répertoire peut être différent selon l'OS et la distribution utilisée, exemple sous une Debian Lenny :

running: make
/bin/sh /var/tmp/pear-build-root/APC-3.1.6/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-root/APC-3.1.6/include -I/var/tmp/pear-build-root/APC-3.1.6/main -I/tmp/pear/temp/APC -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/APC/apc.c -o apc.lo
mkdir .libs
 gcc -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-root/APC-3.1.6/include -I/var/tmp/pear-build-root/APC-3.1.6/main -I/tmp/pear/temp/APC -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/APC/apc.c  -fPIC -DPIC -o .libs/apc.o
In file included from /tmp/pear/temp/APC/apc.c:44:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: Aucun fichier ou répertoire de ce type
In file included from /tmp/pear/temp/APC/apc.c:44:
/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'
/tmp/pear/temp/APC/apc.c:369: error: expected specifier-qualifier-list before 'pcre'
/tmp/pear/temp/APC/apc.c: In function 'apc_regex_compile_array':
/tmp/pear/temp/APC/apc.c:430: error: 'apc_regex' has no member named 'preg'
/tmp/pear/temp/APC/apc.c:430: error: 'apc_regex' has no member named 'preg'
/tmp/pear/temp/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg'
/tmp/pear/temp/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg'
/tmp/pear/temp/APC/apc.c: In function 'apc_regex_match_array':
/tmp/pear/temp/APC/apc.c:463: error: 'apc_regex' has no member named 'preg'
/tmp/pear/temp/APC/apc.c:463: error: 'apc_regex' has no member named 'preg'
/tmp/pear/temp/APC/apc.c:464: error: 'apc_regex' has no member named 'nreg'
/tmp/pear/temp/APC/apc.c:464: error: 'apc_regex' has no member named 'nreg'
make: *** [apc.lo] Erreur 1
ERROR: `make' failed
Ressources en ligne: 
Manuel de APC sur php.net
http://php.net/manual/fr/book.apc.php

Installer la librairie libpcre3-dev

1 lien | aucun commentaire | 0 vote

Beginner
+1 0 -1
Vous n'avez pas voté...
Installer la librairie libpcre3-dev
Solution publiée le 08/20/2014 - 13:43 par david, dernière modification il y a 3 années 10 heures.

Cette erreur survient si la librairie "libpcre3-dev"/"pcre-devel" n'est pas installée, il suffit donc de l'installer, via le gestionnaire de paquets par exemple.

Installer la lib libpcre3-dev (avant APC) :

Debian :

apt-get install libpcre3-dev

CentOS :

yum install pcre-devel

Ensuite installer APC via pecl :

pecl install apc

 

Liens (1)

Fichiers (0)

Pas de fichiers...

Commentaires (0)