I'd like to use r.sun.hourly and r.sun.daily from within QGIS but it doesn't seem to be present in GRASS tools.
I tried to install it using g.extension in the GRASS shell, but it says I have to run it with sudo, and sudo g.extension gives command not found.
I have QGIS 3.26, GRASS 7.8.2 Ubuntu 20.04.
Nota: r.sun is not even present in my installation...
EDIT I tried to open the GRASS shell and use the g.extension command like this :
$ g.extension r.sun
I get :
GRASS_ADDON_BASE is not defined
so I tried to define it :
and
How can I fix this?


g.extensionneed to be run in a GRASS GIS session. You can either define environmental variables or simply use the--execmethod, see https://grass.osgeo.org/grass-stable/manuals/grass.html#batch-jobs-with-the-exec-interface. This will set all needed paths as well. – markusN Dec 17 '23 at 21:15