The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help! APC install with WHM & CentOS

Discussion in 'General Discussion' started by UnGround, Mar 9, 2011.

  1. UnGround

    UnGround Registered

    Joined:
    Jun 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi Everyone. I have searched long and hard for a solution, but nothing is helping. I am trying to install APC on my server with WHM/cPanel installed, but not having much luck. I get the same if I go through WHM PECL install screens.

    > cat /etc/redhat-release
    CentOS release 4.9 (Final)
    > php -v
    PHP 5.3.5 (cli)
    > yum install pcre-devel
    Installed: pcre-devel.i386 0:4.5-4.el4_6.6
    Complete!
    > cd APC-3.1.6
    > which php
    /usr/local/bin/php
    > phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626
    > ./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/local/bin/php-config
    ......
    > make
    /bin/sh /inst/APC-3.1.6/libtool --mode=compile cc -I. -I/inst/APC-3.1.6 -DPHP_ATOM_INC -I/inst/APC-3.1.6/include -I/inst/APC-3.1.6/main -I/inst/APC-3.1.6 -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 /inst/APC-3.1.6/apc.c -o apc.lo
    mkdir .libs
    cc -I. -I/inst/APC-3.1.6 -DPHP_ATOM_INC -I/inst/APC-3.1.6/include -I/inst/APC-3.1.6/main -I/inst/APC-3.1.6 -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 /inst/APC-3.1.6/apc.c -fPIC -DPIC -o .libs/apc.o
    In file included from /inst/APC-3.1.6/apc.c:44:
    /usr/local/include/php/ext/pcre/php_pcre.h:29:18: pcre.h: No such file or directory
    In file included from /inst/APC-3.1.6/apc.c:44:
    /usr/local/include/php/ext/pcre/php_pcre.h:37: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:37: error: syntax error before "pcre_extra"
    /usr/local/include/php/ext/pcre/php_pcre.h:37: warning: data definition has no type or storage class
    /usr/local/include/php/ext/pcre/php_pcre.h:38: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:38: error: syntax error before "pcre_extra"
    /usr/local/include/php/ext/pcre/php_pcre.h:38: warning: data definition has no type or storage class
    /usr/local/include/php/ext/pcre/php_pcre.h:44: error: syntax error before "pcre"
    /usr/local/include/php/ext/pcre/php_pcre.h:44: warning: no semicolon at end of struct or union
    /usr/local/include/php/ext/pcre/php_pcre.h:45: warning: data definition has no type or storage class
    /usr/local/include/php/ext/pcre/php_pcre.h:53: error: syntax error before '}' token
    /usr/local/include/php/ext/pcre/php_pcre.h:53: warning: data definition has no type or storage class
    /usr/local/include/php/ext/pcre/php_pcre.h:55: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:55: warning: data definition has no type or storage class
    /usr/local/include/php/ext/pcre/php_pcre.h:57: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:60: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:63: error: syntax error before '*' token
    /usr/local/include/php/ext/pcre/php_pcre.h:66: error: syntax error before '*' token
    /inst/APC-3.1.6/apc.c:369: error: syntax error before "pcre"
    /inst/APC-3.1.6/apc.c:369: warning: no semicolon at end of struct or union
    /inst/APC-3.1.6/apc.c:370: warning: data definition has no type or storage class
    /inst/APC-3.1.6/apc.c:371: error: syntax error before '}' token
    /inst/APC-3.1.6/apc.c:371: warning: data definition has no type or storage class
    /inst/APC-3.1.6/apc.c: In function `apc_regex_compile_array':
    /inst/APC-3.1.6/apc.c:400: error: `regs' undeclared (first use in this function)
    /inst/APC-3.1.6/apc.c:400: error: (Each undeclared identifier is reported only once
    /inst/APC-3.1.6/apc.c:400: error: for each function it appears in.)
    /inst/APC-3.1.6/apc.c:409: error: syntax error before ')' token
    /inst/APC-3.1.6/apc.c: In function `apc_regex_destroy_array':
    /inst/APC-3.1.6/apc.c:442: error: `regs' undeclared (first use in this function)
    /inst/APC-3.1.6/apc.c:442: error: syntax error before ')' token
    /inst/APC-3.1.6/apc.c: In function `apc_regex_match_array':
    /inst/APC-3.1.6/apc.c:456: error: `regs' undeclared (first use in this function)
    /inst/APC-3.1.6/apc.c:461: error: syntax error before ')' token
    make: *** [apc.lo] Error 1


    Pulling my hair out over this one!!

    Any suggestions are welcome.

    Thanks!
     
  2. UnGround

    UnGround Registered

    Joined:
    Jun 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I should post my problems faster because I quickly find solutions after....

    For those who face the same issue where pcre-devel install through YUM isn't working, here is what worked for me. The problem seems to be CentOS 4.9 being a bit on the older side, and installing older pcre versions.
    > rpm -qa pcre
    pcre-4.5-4.el4_6.6

    Check ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ for the latest pcre version
    wget <latest tar>
    gunzip pcre...
    tar -xf pcre...
    cd pcre...
    ./configure
    make
    make test
    (if PASS)
    make install

    Then you can go and run the make of APC successfully.
     
  3. HRDave

    HRDave Member
    PartnerNOC

    Joined:
    Dec 14, 2001
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    If you're running a newer version of CentOS and having this problem you may also want to just double check that you have pcre-devel installed. Sometimes it's the simple things.

    rpm -qa | grep pcre

    if you dont see the pcre-devel package, run the following:

    yum -y install pcre-devel
     
Loading...

Share This Page