Core: HowTo update Ubuntu 14.04 / php5-apcu to a owncloud supported version

Created on 19 Feb 2015  ·  32Comments  ·  Source: owncloud/core

This is a note to #14273 (Use APCu only if available in version 4.0.6 and higher)

As Ubuntu 14.04 ships currently the php5-apcu version 4.0.2, you get according the merged PR above the Warning in OwnCloud. Ubuntu 14.10 has already release 4.0.6.

Because it may take some time that the version is updated for 14.04 but admins may want to use a stable version of php5-apcu, I thought it is maybe worth to document the procedure how to manually install version 4.0.6 or 4.0.7.

Check the version
sudo dpkg -s php5-apcu

First we have to uninstall the current version:
sudo apt-get remove php5-apcu

Then we need to install the correct working version:
Do a listing of a version you want to install:
http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/
cd /tmp
sudo wget http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/php5-apcu_4.0.6-1_amd64.deb
sudo dpkg -i php5-apcu_4.0.6-1_amd64.deb
sudo rm php5-apcu_4.0.6-1_amd64.deb

Restart php

This issue can be closed when version 4.0.6+ is officially available to Ubuntu 14.04

Most helpful comment

The actual package is now for Ubuntu 14.04 LTS in the backport repo!

[UPDATED]

#> sudo nano /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

#> sudo apt-get update
#> sudo apt-get install php5-apcu/trusty-backports
...

#> apt-show-versions php5-apcu
php5-apcu:amd64/trusty-backports 4.0.7-1build1~ubuntu14.04.1 uptodate

All 32 comments

cc @LukasReschke What to do here?

Nothing from my PoV – we will simply not use older APCu versions and people should complain to their distributor. I wouldn't advise users to use manually backported stuff.

Which means _somebody_ has to do an SRU: https://bugs.launchpad.net/ubuntu/+source/php-apcu/+bug/1374892

I wouldn't advise users to use manually backported stuff.

Ack.

Then we should close this. @mmattel Can you add this to the release notes and link the above Launchpad ticket? Thanks - https://github.com/owncloud/documentation/blob/master/admin_manual/release_notes.rst

Will do, but it may take some days as I will be on vacation

@mmattel No problem :) Thanks

Thanks mmattel. Fixed my owncloud 8.02 problem on Ubuntu 14.04.2.

unfortunately there is no ARM based builds which i use for example :(

root@# uname -a
Linux cubeserver 3.4.79 #7 SMP PREEMPT Tue Apr 1 22:43:53 CST 2014 armv7l armv7l armv7l GNU/Linux
root@# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

As a side note people can go to the previously listed bug (https://bugs.launchpad.net/ubuntu/+source/php-apcu/+bug/1374892) and indicate that it effects you. The more Ubuntu users that register the higher the priority I find.

another sidenote:
if this solution doesn´t work because of dependencies (phpapi-20131226), the following solution may work:
http://xltoolbox.sourceforge.net/blog/2015/04/upgrading-php-apcu-on-ubuntu-14-dot-04-lts/

for ARM you can get the packages here:
http://ports.ubuntu.com/pool/universe/p/php-apcu/

For ARM I succesfully did these steps:

First do:
$ sudo apt-get remove php-apcu
$ sudo apt-get install libpcre3-dev

Then follow the steps in the post below, you will most likely get some error-notification:

http://xltoolbox.sourceforge.net/blog/2015-04-02-upgrading-php-apcu-on-ubuntu-14-dot-04-lts.html

The first complain i got was that the apcu-package is in beta stage. I used
$ sudo pecl install channel://pecl.php.net/apcu-4.0.7
to get it anyways but then it complained about the package not being able to get extracted. To resolve this go to (cd)
/build/buildd/php5-5.5.9+dfsg/pear-build-download
and then run:
$ sudo gunzip ./apcu*
now there should be a *.tar archive.
then you run:
$ sudo pear upgrade ./apcu-4.0.7.tar
and it should work (atleast it did for me)!

You can ignore the warning about php.ini, it is written somewhere else. All you need to do is restart your webserver and owncloud will run and run and run...

The advertised procedure here seems to be to pull a 4.0.6 that was compiled for utopic and manually insert it into trusty.
It probably works, because there is not much difference between the two. Hmmm. Still not a clean solution.

Upstream issue: https://bugs.launchpad.net/ubuntu/+source/php-apcu/+bug/1374892

On Ubuntu 14.04 for APCu 4.0.7

sudo apt-get install php5-dev
sudo apt-get install libpcre3-dev
sudo pecl channel-update pecl.php.net
sudo pecl install apcu
/etc/init.d/php5-fpm restart

I suppose this works fine.

@filippouni
Thank you for that alternative.
Yours (and also the ARM solutions discussed above) is a non-packaging solution, it installs a build environment and compiles from source.

I also get this error message:
Failed to download pecl/apcu within preferred state "stable", latest release is version 4.0.7, stability "beta", use "channel://pecl.php.net/apcu-4.0.7" to install
install failed

sudo pecl install channel://pecl.php.net/apcu-4.0.7 works as suggested.

@Bratzmeister
Worked for me too...
Just had to recreate the softlink in /etc/php5/fpm/conf.d/ to the apcu.ini

By the way, the correct link for the post you mentionned is :
http://xltoolbox.sourceforge.net/blog/2015-04-02-upgrading-php-apcu-on-ubuntu-14-dot-04-lts.html

Thanx!

@Projekt-43

Oh, seems like that site had a rework. Thanks for pointing out. I fixed the link.
nice that it works for you!

I could have sworn that 4.0.6 used to be an option, am I missing something? It is no longer available.

http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/

@jcmorales85
you can get the .deb package from my site ;)

http://code-engine.org/2015/10/17/owncloud-caching-with-ubuntu-14-04/

@Equilibri0
Thank you very much!!! Much appreciated.

The actual package is now for Ubuntu 14.04 LTS in the backport repo!

[UPDATED]

#> sudo nano /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

#> sudo apt-get update
#> sudo apt-get install php5-apcu/trusty-backports
...

#> apt-show-versions php5-apcu
php5-apcu:amd64/trusty-backports 4.0.7-1build1~ubuntu14.04.1 uptodate

@apos Great news. For linux noobs like me, to install it, just enter:
user@server: # sudo apt-get install php5-apcu/trusty-backports

Thanks for the instruction mmattel. Without it i was not able to get APCu running.

@stieler-it
Your command "sudo apt-get install php5-apcu/trusty-backports" results into

"E: Veröffentlichung »trusty-backports« für »php5-apcu« konnte nicht gefunden werden." (trusty-backports for php5-apcu not found)

Any idea? (Ubuntu 14.04 LTS)

Any idea? (Ubuntu 14.04 LTS)

You can only use the _trusty-backports_ repository, if you enable it in the sources.list ;-)

#> sudo nano /etc/apt/sources.list
deb http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

#> sudo apt-get update
#> sudo apt-get install php5-apcu/trusty-backports

@apos Thanks! After a
sudo apt-get update
sudo apt-get install php5-apcu/trusty-backports
worked and installed php5-apcu (4.0.7-1build1~ubuntu14.04.1)! :-)

trusty-backports is enabled in my sources.list file, and I still get errors. I'm on an arm processor, so same/similar issue here as @astalavister (did you solve this in some way?)

Edit: Never mind. Downloaded from launchpad directly and installed with gdebi. Not sure why my system refuses to install it through apt-get.

If about me - yes, i've solved but for now cant remember how. used owc on cubietrack for about year, but completely moved from arm to new intel atom based board, disappointed with arm speed. atom is way faster with comparable power usage.

Hi
Thank you for sharing a nice article. Really I like this Article. Here is My site

Hey guys have someone of you installed apcu for php7?

@RodolVelasco I've tried to, but I get an error.

wget http://pecl.php.net/get/apcu-5.1.3.tgz /opt/plesk/php/7.0/bin/pear install apcu-5.1.3.tgz
Then I get an error
compilation terminated. make: *** [apc.lo] Error 1 ERROR:make' failed`

At this point I'm stuck. I don't know enough about ubuntu to get this running. But APCu is the memcache you wnat for oc 9 with php 7. For php5.5 I use the 4.0.7 atm. It works, so I don't mess with it ;).

cheers,
st.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings