Yunohost PHP Version/Nextcloud OCC commands

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.11
How are you able to access your server: SSH

Describe your issue

I am trying to run the occ command for nextcloud but am getting an error message that the php version being used by yunohost is out of date, so the command will not execute. How to fix?

Share relevant logs or error messages

root@domain:/var/www/nextcloud# sudo -u www-data php occ db:add-missing-indices
This version of Nextcloud requires at least PHP 8.1
You are currently running 7.4.33. Please update your PHP version.root@domain:/var/www/nextcloud#

This is the info provided in the app page in the webadmin. Is it working?
sudo yunohost app shell nextcloud
then run
php occ ...

1 Like

thank you