Thermo_style yaml not working Ubuntu

Dear users,
I am trying to use the thermo_style yaml command in Ubuntu and I am getting the folowing error:

ERROR: Illegal thermo style command (src/thermo.cpp:143)
Last command: thermo_style yaml

The same script in Windows is working properly.
Thank you in advance!

Please check which LAMMPS version you have on the different platforms.

As you can see from the online documentation, thermo style yaml appeared in LAMMPS in version 24 March 2022: thermo_style command — LAMMPS documentation

Thank you very much!