Installing APC. Use pecl or apt-get?
Solution 1
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.
Solution 2
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
Solution 3
"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.
Related videos on Youtube
ril44
Updated on September 18, 2022Comments
-
ril44 almost 2 years
I have seen guides that use
apt-get install php-apc
and guides that usepecl 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.
-
Admin about 12 yearsI think php-apc is broken in Ubuntu, last I checked it was at least.
-
Admin about 12 yearsBoth 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 about 12 yearsThanks 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?
-
Ramesh Chand about 8 yearsThanks worked for me sudo apt-get install php-apc with PHP 5.5.9-1ubuntu4.17 ;-)