I am running 10.10 version.

I install APC as

sudo apt-get install php-apc

It gets APC (3.1.3p1) installed. The latest one is 3.1.10 right now.

How can I update to latest one?



You need to

  1. wait for it to turn up in the official Ubuntu repository, or
  2. install PEAR and use PECL/PEAR to install APC but I don't know if that will work for you on Ubuntu

Assuming you have PEAR/PECL installed (and any other necessary dependencies), this should install APC from that repository, which may be at a higher version than the Ubuntu package. It also requires 'libpcre3-dev' to be installed in order to compile properly.

sudo apt-get install libpcre3-dev
sudo pecl install apc
  • 1
    for reference, i just successfully installed via pecl. however, it also requires 'libpcre3-dev' to be installed, otherwise there will be error compling. cogo.wordpress.com/2010/07/19/… . after that, just execute sudo pecl install apc to install. – gilzero May 14 '12 at 15:30

Since you are running a released version of ubuntu, you shouldn't expect newer upstream versions of software to be released for that version of ubuntu, only security patches to older versions. You can see here that 3.1.10 has been released for a newer release of ubuntu. You can try backporting that version.

To backport, first you need to add a deb-src line to sources.list that can download source packages for quantal.

deb-src http://us.archive.ubuntu.com/ubuntu/ quantal main universe 

Add only that line to sources.list, do not add a deb line, just deb-src. Then run apt-get update. Then apt-get build-dep php-apc ; apt-get install build-essential will install the packages needed for building php-apc, and apt-get source -b php-apc should download the source for apc, and build a new .deb in the current directory. If this works, you can install the deb with somethign like dpkg -i ./php-apc-$newversion.deb

However, if you go this route (or pretty much any other route which moves you away from the official ubuntu package for your release), you are on your own for security updates to this package. And because of this, you should question whether you really need the newer version, or of you just want it because 10 > 3.

  • 1
    APC 3.1.3 is now nearly 3 years old. I don't see why one should not upgrade. Lots and lots of bugs were fixed even by the step from 3.1.3 to 3.1.4: Complete Changelog. – SebiF May 14 '12 at 14:09
  • 1
    and lots of new not yet discovered bugs could have potentially been introduced. Or incompatibilities with other software could have been introduced. This is always the trade-off. – stew May 14 '12 at 14:13
  • thanks, should I remove current apc first before attempt install newer? sudo apt-get remove php-apc – gilzero May 14 '12 at 14:46
  • no need to remove first, this will upgrade. – stew May 14 '12 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.