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

**URL:** <https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479>\
**Category:** Linux in the Cloud\
**Created:** [April 24, 2023, 10:37pm UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479 "2023-04-24T22:37:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@Adam](https://community.learnlinux.tv/u/Adam)\
**Post date:** [April 24, 2023, 10:37pm UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479/1 "2023-04-24T22:37:41Z")

</div>

Hello,

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

 ![image](https://community.learnlinux.tv/uploads/default/original/1X/3598125b8b1a1090bc6d07ceede095d00b398c6c.png)

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

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [April 24, 2023, 11:24pm UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479/2 "2023-04-24T23:24:05Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![Adam](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@Adam](https://community.learnlinux.tv/u/Adam)\
**Post date:** [April 25, 2023, 2:08am UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479/3 "2023-04-25T02:08:45Z")

</div>

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

![image](https://community.learnlinux.tv/uploads/default/original/1X/83d0e4175c133fc9d4351fef1cca0dfd83c6c185.png)

Here are the PHP modules from the origin server

![image](https://community.learnlinux.tv/uploads/default/original/1X/a4526e676fad4e6b700275e1964afc22be70abe5.png)

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

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [April 25, 2023, 10:51am UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479/4 "2023-04-25T10:51:17Z")

</div>

> <https://github.com/nextcloud/server/issues/27781>
>
> Nextcloud 21.0.3.1 (after upgrade from 21.0.2.1)
> Debian 10.10 Buster
> Apache 2.…4
> PHP 7.3.27
> 
> After the upgrade on my machine there is a condition not appearing in any NC version before:
> \`\`\`
> $ sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
> An unhandled exception has been thrown:
> OC\\HintException: \[0\]: Memcache \\OC\\Memcache\\APCu not available for local cache (Is the matching PHP module installed and enabled?)
> \`\`\`
> No logging entry found. \*\*This makes the NC cron job unavailable\*\* apparently.
> 
> No such issue in any version before 21.0.3. All settings in place.
> 
> see also: https://help.nextcloud.com/t/cron-not-running-in-nc-21-0-3/119415/7?u=tp75

apc.enable\_cli = 1 in php.ini

---

<div class="post-metadata">

**Author:** ![Adam](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@Adam](https://community.learnlinux.tv/u/Adam)\
**Post date:** [April 25, 2023, 12:59pm UTC](https://community.learnlinux.tv/t/nextcloud-occ-error-memcache-oc-memcache-apcu-not-available-resolved/2479/5 "2023-04-25T12:59:49Z")

</div>

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

 ![image](https://community.learnlinux.tv/uploads/default/original/1X/85981cea7786512d45e8aaf2bdd4961dc5d39c11.png)
