Nextcloud OCC error " Memcache \OC\Memcache\APCu not available " [RESOLVED]


I successfully migrated my nextcloud to another server, however when using an occ command I get to following error:

root@NextCloud:/var/www/nextcloud# sudo -u www-data php occ
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

origin server details : Ubuntu 20.04.6 - PHP 8.0.13

new server details: Ubuntu 22.04 - PHP 8.1.2

been searching forums looking for solution, unable to replicate, any help to determine how to fix the problem appreciated

apt search php | grep -i oc or maybe greb for mem. One php module is missing from your system. It could also be that you may have not migrated the apache folders correctly or in their entirety, although less likely.

1 Like

@ThatGuyB thanks for helping, here are the PHP modules installed


Here are the PHP modules from the origin server


When I migrated my nextcloud, I brought over the database, the data, and the config.php. I did not migrate apache folders.

apc.enable_cli = 1 in php.ini

1 Like

@ThatGuyB that lead found the solution, appreciate your help, in the end [ apc.enable_cli=1 ] needed to be added in apcu.ini

1 Like