Need help for update PHP in a DietPi at Raspberry 4B+

I already flashed again the new image of DietPI at my raspberry pi 4B+, but the installation of nextcloud, trhow DIetPi install php7.4.

I already tried 3 times update php to 8.0, but sometimes they also install 8.2 and then rpi lost the sync with nextcloud.

Any step by step tutorial to do it at Dietpi? Or should I change for another linux distro?

I am not aDietpy specialist but since it is a debian based os, you could try this.

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

If this does not work for you, don’t’ hesitate to ask me.
If you need further help or information e.g. about what php-sapi you could use. I will do my best helping you.

1 Like

Sorry for late response.
I tried it, but it doesn’t work.

I downloaded the original image of nextcloud and put it to run.
I was trying to use DietPi because it has a fame of be a very lightweight system, but unfortunately, time is money. LOL!

THanks so much!