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 have downloaded the APC-3.1_9.tgz official version.

When I followed the steps:

  1. tar -xzvf APC-3.1_9.tgz
  2. cd APC-3.1_9
  3. phpize
  4. ./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/bin/php (the command "which php" outputs /usr/bin/php)
  5. make

I got the following error:

/bin/bash /tmp/APC-3.1.9/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.9 -DPHP_ATOM_INC -I/tmp/APC-3.1.9/include -I/tmp/APC-3.1.9/main -I/tmp/APC-3.1.9 Usage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [--] [args...] php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...] php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...] php [options] -- [args...] php [options] -a -a Run as interactive shell -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse and execute <file>. -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -r <code> Run PHP <code> without using script tags <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -s Output HTML syntax highlighted source. -v Version number -w Output source with stripped comments and whitespace. -z <file> Load Zend extension <file>. args... Arguments passed to script. Use -- args when first argument starts with - or script is read from stdin --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --ri <name> Show configuration for extension <name>.  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.9/apc.c -o apc.lo
/bin/bash: -c: line 0: syntax error near unexpected token `<'
/bin/bash: -c: line 0: `/bin/bash /tmp/APC-3.1.9/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.9 -DPHP_ATOM_INC -I/tmp/APC-3.1.9/include -I/tmp/APC-3.1.9/main -I/tmp/APC-3.1.9 Usage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [--] [args...] php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...] php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...] php [options] -- [args...] php [options] -a -a Run as interactive shell -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse and execute <file>. -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -r <code> Run PHP <code> without using script tags <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -s Output HTML syntax highlighted source. -v Version number -w Output source with stripped comments and whitespace. -z <file> Load Zend extension <file>. args... Arguments passed to script. Use -- args when first argument starts with - or script is read from stdin --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --ri <name> Show configuration for extension <name>.  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.9/apc.c -o apc.lo '
make: *** [apc.lo] Error 1
share|improve this question

migrated from stackoverflow.com Oct 29 '11 at 1:36

This question came from our site for professional and enthusiast programmers.

    
Install the php-pecl-apc package from your distro's repository if available (e.g. yum install php-pecl-apc for CentOS/RHEL) - tends to have a much higher success rate if you don't require the latest version or non-default customizations. –  cyberx86 Oct 29 '11 at 1:46

3 Answers 3

php-config should point at...php-config, not php.

share|improve this answer

I would install APC with: pecl install apc

Unless you really need to use the source.

share|improve this answer
    
Sometimes you really need to install from the source. –  user1018770 Oct 29 '11 at 18:48

Thanks everybody for your answers. The solution was:

Use this line: ./configure --enable-apc --enable-apc-mmap

instead this: ./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/bin/php

Problem fixed.

share|improve this answer

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.