Nextcloud version (eg, 20.0.5): 22.2.3
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.1.1
The issue you are facing:
when i sudo apt-get upgrade my server, i got this message :
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
libapache2-mod-php8.0 linux-image-5.10.0-9-amd64 php8.0 php8.0-curl php8.0-gd php8.0-mbstring php8.0-mysql php8.0-zip
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
that means that these packets are not useful anymore right ?
but if i do autoremove, then i can’t access anymore my interface (404 page not found) and i can’t sync nextcloud over my devices.
For now i’ve managed to restore a previous backup so my instance is working well until i forgot about that and i do the mistake to autoremove in few weeks…
You can cetainly do that. If you know what you are doing and if you know what do to if apt misbehaves and thinks it has to uninstall the whole desktop because you want to update Steam
@grosJambon33000 You have two options: Either you install the PHP packages from the stable repository (bullseye) without version specification or you install explicitly certain versions from the backports repository (bullseye-backports), like you probably did. Why Apt then thinks it it has to “upgrade” explicitly installed package versions with “other” versions, and even uninstall some packages in this specific situation, I do not know. I guess it could have something to do how it handels priorities between diffrent repositories. So either comment the backports repo out and reinstall everything without using backports, or read up here` on how it all works with diffrent repos… Keyword: apt pinning
Plus make notes on how you installed and configured PHP. When something similar happened to me a while ago on Ubuntu, I just purged php completely including configs and then reinstalled it using my instructions. 5 mins later everything worked like before.
Let me put it this way… As long as you do not absolutely need a newer PHP version, it’s probably best to just use the packages from stable. Also PHP with all it’s dependencies and diffrent modules already brings a certain complexity with it, and working with multiple repos and versions dosn’t necessarily make it less complex. But it can be done obviously… Here the link to the backports instructions if you want to read more about it: Instructions