9

I have done this

sudo apt-get install php-pear php5-dev make libpcre3-dev

and then

sudo pecl install apc

But I'm getting this error:

                         ^
make: *** [apc_compile.lo] Error 1
ERROR: `make' failed

Do you have idea what can be issue? And how to solve it?

Nikola
  • 133
  • 1
  • 1
  • 6

2 Answers2

28

Why do you install PHP over the package manager and APC over PECL?

apt-get install php-apc

is much easier and you get the correct package for APC.

René Höhle
  • 26,716
  • 22
  • 73
  • 82
  • I have done "apt-get install php-apc" and then "sudo pecl install pac" and again the same error – Nikola Feb 07 '14 at 11:30
  • You don't need pecl. You have installed the package over the package manager. Restart PHP / Apache and its working. – René Höhle Feb 07 '14 at 11:35
  • With "apt-get install php-apc". – René Höhle Feb 07 '14 at 11:37
  • 2
    Please also refer : https://bugs.php.net/bug.php?id=65731 [2013-09-21 14:38 UTC] rasmus@php.net -Status: Open +Status: Suspended [2013-09-21 14:38 UTC] rasmus@php.net APC doesn't support PHP 5.5. PHP 5.5 comes bundled with an opcode cache now. – Sumit Arora May 30 '14 at 16:47
0

Just an addition to the answer mentioned as correct. I got

Package 'php-apc' has no installation candidate

when tried to install with sudo apt-get install php-apc. So try sudo apt-get install php-apcu and use apcu instead of apc everywhere.

JOSEPH BENOY
  • 149
  • 1
  • 6