# Installing APC. Use pecl or apt-get?

I have seen guides that use apt-get install php-apc and guides that use pecl install apc.

Is one method better then the other? Or is just two different methods of installing the same thing? What is the difference?

From what I read it seems that using pecl install will get a later version, is that right?

Using Ubuntu 12.04-64bit if it matters. Thanks.

-
I think php-apc is broken in Ubuntu, last I checked it was at least. –  Thomas W. Jun 21 '12 at 3:55
Both methods of installing APC worked for me. Using pecl, I had to install a additional package or two or else it would get a error and abort installation. I was just wondering if one method does something addtional... –  ril44 Jun 21 '12 at 22:34

It depends on if you want to manage upgrades with apt-get or pecl. Either way there's no real benefit to one vs the other.

-
Thanks for the answer! –  ril44 Jul 9 '12 at 21:59

The difference is that PECL will provide you with a newer version of APC.

• PECL will install the latest released version, 3.1.13 at the time of this writing
• APT will install 3.1.7 on 12.04 LTS

See the differences on the changelog: http://pecl.php.net/package-changelog.php?package=APC&release=3.1.7

All in all:

• If you don't care too much about the version, use APT since it's easier to maintain
• If you need some of the most recent features or fix, use PECL
-

"PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions."1 PECL comes with the php-pear package.

To install the APC,

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install php-apc


Note: On newer releases of Ubuntu, APC is available from the package manager; however if using older Ubuntu release and you can't find an apc-php package. You can the install via PECL, but some dependencies need to be installed, then PECL can be used to install APC.

-
Thanks for the reply. I understand what PECL is and how to install APC using apt-get. I was curious what the differences were between the two methods? Is one method better then the other? –  ril44 Jun 21 '12 at 22:35