[SOLVED] NextCloud is down/unable to locate package php7.0-memcached

I noticed NextCloud was not properly syncing files this morning. I only received a blank screen when attempting to log into the web interface. I ssh’d in to my Ubuntu 14 instance on Digital Ocean, ran apt update && apt upgrade, and mailinabox as a quick fix. But running mailinabox now results in the following error:

Mail-in-a-Box Version:  v0.28

Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
bayes: synced databases from journal in 0 seconds: 546 unique entries (724 total entries)
Installing Nginx (web server)...
Installing Roundcube (webmail)...
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/apc.so' - /usr/lib/php/20151012/apc.so: undefined symbol: zif_apcu_store in Un
known on line 0
Installing Nextcloud (contacts/calendar)...

FAILED: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install php7.0 php7.0-fpm php7.0-cli php7.0-sqlite php7.0-gd php7.0-im
ap php7.0-curl php-pear php-apc curl php7.0-dev php7.0-gd memcached php7.0-memcached php7.0-xml php7.0-mbstring php7.0-zip php7.0-apcu
-----------------------------------------
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php7.0-memcached
E: Couldn't find any package by regex 'php7.0-memcached' 

Any thoughts?

1 Like

dustinboston, out of curiousity, were you having connection issues to your owncloud contacts and calendaring before running the installer?
I had the similar issues and did a few things that are not supported. I just got my install working though via the following steps. These are bad ideas, will probably break things, and are unsupported. So copy off your backups first!
I ran the following to make sure I had no uninstalled deps:

sudo apt-get update –fix-missing
sudo dpkg –configure -a
sudo apt-get install -f

I then ran: (to manually install php7.0-apcu)

sudo apt-get install php7.0-dev
sudo pecl channel-update pecl.php.net
sudo pecl install apcu

##echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

The sed and grep just finds your php.ini path, mine was /etc/php/7.0/cli/php.ini and I edited (using sudo) the file directly to add extension=apcu.so to the end.

I downloaded (git clone) the github version of the install script (I can post the instructions, but you should see them on the github page)
I changed into the newly created mailinabox directory
I modified the setup/owncloud.sh script and changed php7.0-apcu to php-apcu so the script wouldn’t fail (apcu should be installed now manually, and that package doesn’t exist)
I finally ran sudo setup/start.sh

after all that, I now have a running system where my calendar and contacts are properly syncing.
It appears the php7.0-apcu package does not exist.

again, this is some pretty bad manual stuff to get my install working. back everything up and you may need to perform a clean install to a clean image after these tweaks.

Edit:
I used the latest script from github due to having the memcached install issues with the official version, and my version was requiring php-memcached:i386 which was not installing.

1 Like

Just wanted to chime in that as of this morning, I also started receiving error messages emailed to from the cron daemon. I’m on Digital Ocean also. Tried running sudo mailinabox and got the same error as dustinboston.

From:
[ Cron Daemon
To:
[root@

Subject: Cron <root@box> [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/apc.so’ - /usr/lib/php/20151012/apc.so: undefined symbol: zif_apcu_store in Unknown on line 0

RKD2 and dustinboston,
Have either of you opened a ticket for this? I have not, and likely won’t since I found a solution for now.
Thanks.

I’m seeing a similar error when trying to create a new installation.

@draino Thanks for the help. I am a bit nervous about updating it this way because future versions of MiaB might break.

I created an issue here: https://github.com/mail-in-a-box/mailinabox/issues/1442

2 Likes

I ran into the same issue as @RKD2. For me I don’t think this was an issue with MiaB but rather something that Linode changed/updated.

When I logged into the server to see what was going on I noticed that I had some updates to run so I did that then checked to see if that fixed the error. Since I was still getting the error I restarted nginx and some other services with no effect so I rebooted the node which got php working correctly again. In my experience a reboot is not normally necessary but I have run into situations in the past where rebooting allowed everything to reconnect to moved/updated resourced after an update.

For me this fixed the issue and now all is right with the world.

More details for those who care…
I was getting the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/apc.so' - /usr/lib/php/20151012/apc.so: undefined symbol: zif_apcu_store in Unknown on line 0

I logged into the node and ran sudo apt-get update && sudo apt list --upgradable to check for updates.

The following were in the list of available updates:
php-apcu
php-apcu-bc
php-common
php-igbinary
php-msgpack
php-xml
php7.2-common
php7.2-xml

To fix it I ran an update and upgrade with: sudo apt-get update && sudo apt-get upgrade and after restarting some services without any effect I rebooted the node.

In the end I believe the update, upgrade, and reboot were all that was needed.

1 Like

I was having the same issue but on digital ocean; Thanks for the post, this fixed it for me as well.

Could either of you comment on if your system was up to date 2-3+ hours ago and these were new updates available to you in the past hour?
I see new updates as well that are new for me in the past ~hour.
Thanks!

These updates were new for me as of this morning. Not within the last hour.

I am assuming if Digital Ocean is making updates that they are rolling them out.

I just performed an upgrade (thanks @CurtisN) and so far seems to have worked. I have no idea as to when the updates became available.

I received this message during the upgrade.

The following packages will be upgraded:
php-apcu-bc php-memcached php-msgpack

Thanks @CurtisN, this fixed my issue!

@draino,
To my knowledge this system was up to date.

I’m not sure when the updates I mentioned became available but I have not received a “Status Checks Change Notice” email with any packages for update from the MiaB daily check for a while.

The updates I mentioned only showed up when I looked for them. In addition, I did not start receiving the emails with the php errors until around 8am Mountain.

Seems to me that, at least for my systems, these updates were only available since the last nightly MiaB check.

apt-get update && apt-get upgrade
curl … | bash

and I’m proceeding as well.
thanks

I ran the update/upgrade again, then rebooted, and it works great.

Just had a chance to look at this more while working on another MiaB server I manage that was having this same issue and realized that MiaB runs php-fpm.

This time around instead of rebooting the node I restarted the php7 and php5 fpm services.

The commands I ran were:
sudo apt-get update && sudo apt-get upgrade
sudo service php7.0-fpm restart
sudo service php5-fpm restart

Same result. All is back up and running as normal.

As a note, re-running the MiaB install after the update/upgrade works also as the services are restarted as part of the MiaB install process.