Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
2  
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

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
    
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
share|improve this answer

"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.

1 "What is PECL?"

share|improve this answer
1  
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

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.