Problem updating Magento (From Pro script to Composer)

SYSTEM INFORMATION
OS type and version Almalinux 9.7
Virtualmin version 7.50.0 Professional

Hello, I have installed Magento 2.4.8 on Almalinux 9 with Webmin using Virtualmin Pro install script. Whole process went without problem. I was thinking about updating it to latest security version 2.4.8-p3.
But when I use “composer update” in terminal it says:
Problem 1

    • Root composer.json requires magento/product-community-edition 2.4.8-p3 → satisfiable by magento/product-community-edition[2.4.8-p3].*
    • magento/product-community-edition 2.4.8-p3 requires php ~8.2.0||~8.3.0||~8.4.0 → your php version (8.0.30) does not satisfy that requirement.*

And other lines with same problem, that “I don’t have valid PHP”, even when PHP -v shows that required PHP is running. I tried it with 8.2; 8.3; 8.4 from these instructions: Configuring Multiple PHP Versions | Virtualmin — Open Source Web Hosting Control Panel
Also tried “alias php=‘/usr/bin/php84’” but that did not help.
Can someone help? Or using install script it is not intended to be updated? Thank you in advance.

P.S. Another small question, Is PHP 8.4 not compatible with Almalinux 9? It says that it is in beta/alpha state explicitly with Almalinux 9, but only one page on internet says that: CrownCloud Wiki - How To Install Php 8 4 On AlmaLinux 9 From my experiments it looks fastest.

Found simple solution: “/usr/bin/php84 /usr/bin/composer update” Just now left out to figure out why after update website ends up on 500 Internal server error :sweat_smile:

1 Like

This seems to be kind of an ongoing issue. Command line cli is the system default and not the php chosen for the server.

How can I change Command line system default when I have Root access? I rent VPS that offers many OS or OS with panels like Virtm, other apps and so on… Thanks in advance :waving_hand:

You have selected php 8.4 in your virtual server and check phpinfo?