raspi-user.france
Posts: 15
Joined: Mon Jan 09, 2017 11:31 am

Enable php-apcu on Raspbian Buster with apache2 (nextcloud)

Sun Jul 28, 2019 6:17 am

I tried to get the php apcu module enabled on the Raspbian Buster for a nextcloud installation but got stuck.

I think the issue goes back to having two php versions in Raspbian Buster:
On Buster php 7.2 and 7.3 are installed by default. Installing apcu with 'apt install php-apcu' works fine as such, but installs apcu as part of 7.3 (i.e. it can be found at '/var/lib/php/modules/7.3/'). apache2 itself is running with 7.2 though on Raspbian Buster. I also tried to change to 7.3 but that failed with an error message (with 'a2dismod php7.2' and 'a2enmod php7.3'). There is also no way I'm aware of to install php-apcu for 7.2 explicitly (with e.g. 'apt install php7.2-apcu').

Does anyone have similar issues; I'm I doing something completely wrong? Any ideas or comments how to enable apcu are more than welcome.

nigelbartlett1
Posts: 44
Joined: Mon May 06, 2019 9:39 am
Location: London UK

Re: Enable php-apcu on Raspbian Buster with apache2 (nextcloud)

Sun Jul 28, 2019 11:45 am

I haven't tried nextcloud but I don't have any trouble with PHP on Buster, and PHP 7.2 is not installed by default.

I did the following:
  • Started with a clean install of the latest Raspbian Buster
  • Did an "apt full-upgrade" after an "apt update"
  • Did an "apt -y install apache2"
  • Did an "apt -y install php"
At each step I searched for installed versions of PHP. There were none until after the last one, where I had only php 7.3 installed.

What did you do to get in the state you are now in?

In any event my recommendation is to start with a clean install of Raspbian Buster, followed by a full-upgrade and an install of Apache and PHP. You can then install php-acpu. This installed php-acpu version 5.1.17+4.0.11-1.

raspi-user.france
Posts: 15
Joined: Mon Jan 09, 2017 11:31 am

Re: Enable php-apcu on Raspbian Buster with apache2 (nextcloud)

Sun Jul 28, 2019 11:57 am

Hmm, I started with a completely fresh install of the latest Raspbian and then tried to follow the installation instructions on nextcloud.com (taking the section on Debian, which probably was my mistake). Nextcloud suggests the following:

Code: Select all

apt-get install apache2 mariadb-server libapache2-mod-php7.2
apt-get install php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring
apt-get install php7.2-intl php-imagick php7.2-xml php7.2-zip
which probably (I don't remember) did install php7.2. I'll re-try with a brand new installation from scratch avoiding the installation instructions from nextcloud.com this time.

raspi-user.france
Posts: 15
Joined: Mon Jan 09, 2017 11:31 am

Re: Enable php-apcu on Raspbian Buster with apache2 (nextcloud)

Thu Aug 01, 2019 9:06 am

First of all, many thanks for the feedback! I just did a full, new Raspbian installation and it is working fine now. The issue really was, that I followed the manual nextcloud installation for Debian (on nextcloud.com) which explicitely states the php version. I just left out the version part of the php modules and it works (so Raspbian is not Debian).

Return to “Troubleshooting”