When I need to upgrade my installed version of Nextcloud (previously version 28.0.7; now updated to version 28.0.9), I usually have to use the command line interface update option either because a backup step fails in the update, or the tarball integrity check fails for the new files. I use the steps recommended in the Nextcloud documentation. The command I use is this one (I have an install of Ubuntu):
sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Sometimes, though, this isn’t enough. I may also have to deal with an APCu error (the system or the installer may not detect it running). A part of this problem stems from having an old install and the configuration needs to be changed. That, and the server I host it on doesn’t have enough resources to run all these servers. When APCu fails me, I use this command:
sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/updater/updater.phar
After that, the upgrade usually goes smoothly. Maybe I need to update an app or something in the database. But that’s it.
Hope this helps anyone with an APCu error when they’re trying to update their install of Nextcloud.