Thanks for the reply. I think I am doomed. I just don’t have enough knowledge to know what to do. I have been running nextcloud for years and love it. I have upgraded many times. I was at least on version 19 a long time ago. I ran the commands below but I get this error now.
OCP\HintException: : Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
I wrote a script for safe php upgrade on Ubuntu with apache2.
The script works if the following requirements are met:
The old php version (7.4) must still be fully installed.
This condition is met if you have not yet explicitly uninstalled (with --purge) any old php7.4 packages.
There must be no incomplete PHP installation of the new version.
In your case it looks like not all pecl packages needed by your installation are installed. Therefore, if 1. is met, the already installed php8.0 packages should be removed first:
execute the script simply by calling it: sudo php-updater
it looks what php-version actually is installed and asks which new version you want to install. (First I would recommend 8.0). After the installation it migrates all settings from your old php-installation (php.ini for php-cli and php-apache2 or - in case you are using php-fpm - the php.ini for php-fpm and pool.d/www.conf for php-fpm) into the new version.
If you already have completely installed one or more new versions (e.g. 8.0 and 8.1), you can use the script for only the later step (the migration from all setting) by calling it sudo php-updater 7.4 8.0
In this case, it would read the settings from your 7.4 Version and helps you to integrate them into the 8.0 version.
Run this command to control, if all php-versions are switched to the version you want. I would recommend to not leave it in automatic mode but choosing the respective manual mode so that no unintentional version changes can take place, but only after your conscious change (using this command):
for linkgroup in $(ls /var/lib/dpkg/alternatives/ | grep -E "ph(ar|p)"); do sudo update-alternatives --config $linkgroup; done
finaly change the used libapache2-mod-php in your apache server (if not yet done by installation routine):
If everything seems to work fine, then you seem to have made the right steps all by yourself.
You can at least skip part 1 of the script (the update process) and only do the second step, just to align the settings from the old installation with the new one: sudo php-updater 7.4 8.0 (assuming you updated to 8.0). You dont need to have any fear, it asks you before anny change would be made.
The step of switching the update-alternatives version control to manual mode is definitely a good choice to avoid accidental version switches and -mismatches. The next time you update your php Version, you know what you have to do [^note]. (Simply calling sudo update-alternatives basically does exactly the same, it then shows ALL the alternatives managed by this tool and not just the php-related ones. Just skip the alternatives you want to leave with “Enter”.)
[^note]: For a future update, you can check if an updated version of the script is available, as I continue to develop it, adding new features from time to time. For example the update-alternatives switch, the automatic switch between libapache2-mod-php and php-fpm and back etc. and some analysis routines, to analyze errors or weak points to fix them in a dialog.