Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to get APC running for a Drupal install of mine. I found a fairly concise guide at http://blog.4rev.net/2009-09/installing-apc-accelerator-into-php5-fedora-core-11/ for installing on FC11, only, I am using FC12. I figured I would give it a shot.

I was able to run the following commands successfully - and yum installed fc12 versions of everything in the FC11 guide.

 yum install php-pear

    yum install php-devel httpd-devel

    yum groupinstall ‘Development Tools’

    yum groupinstall ‘Development Libraries’

Then, I tried pecl install apc. Everything looked good until to got to the end, where it outputted the following error.

/var/tmp/APC/php_apc.c: In function ‘zif_apc_compile_file’:
/var/tmp/APC/php_apc.c:881: warning: unused variable ‘eg_class_table’
/var/tmp/APC/php_apc.c:881: warning: unused variable ‘eg_function_table’
/var/tmp/APC/php_apc.c: At top level:
/var/tmp/APC/php_apc.c:959: error: duplicate ‘static’
make: *** [php_apc.lo] Error 1
ERROR: `make' failed

Some people have had success with installing apc-beta, but that didn't work for me..

Any suggestions? Is there something I missed that is critical in the FC12 version?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

This is what worked for me..

# # install APC package  
# yum install php-pecl-apc  
#   
# # install gd package to have graphs in APC dashboard (optional)  
# yum install php-gd  

I found this at.. http://www.redips.net/wordpress/make-it-faster/

share|improve this answer
add comment

To resolve this and reinstall the APC(make sure that EAccelerator removed from php),before reinstall the APC install the following packages :-

yum install pcre-devel

before installing APC.

On Debian use

aptitude install libpcre3-dev

Then you will get the following response when you reinstall the APC :-

share|improve this answer
add comment

another solution that worked for me was to edit the file /var/tmp/APC/php_apc.c and remove "static" from line 959. then i ran make and make install and it worked.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.