I want to install `r.clip` Grass extension with Rstudio and `g.extension` but I have error `ERREUR : Variable 'LOCATION_NAME' non définie`. My code is : install.packages("rgrass7") library(rgrass7) # Creation Grass environment initGRASS("C:/Program Files/GRASS GIS 7.6", override = TRUE, gisDbase = "GRASS_TEMP", home = tempdir(), mapset = "PERMANENT", remove_GISRC = TRUE) # To install extension execGRASS(cmd = "g.extension", flags = "s", parameters = list(extension = "r.clip", operation = "add")) And the code to install extension return this error : > execGRASS(cmd = "g.extension", + flags = "s", + parameters = list(extension = "r.clip", operation = "add")) ATTENTION: Extension <r.clip> already installed. Re-installing... Downloading precompiled GRASS Addons <r.clip>... ERREUR :Variable 'LOCATION_NAME' non définie ERREUR :Variable 'LOCATION_NAME' non définie ERREUR :Variable 'LOCATION_NAME' non définie Traceback (most recent call last): File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 1748, in <module> sys.exit(main()) File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 1727, in main install_extension(source=source, url=url, xmlurl=xmlurl) File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 702, in install_extension blist = install_extension_xml(xmlurl, mlist) File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 922, in install_extension_xml write_xml_modules(xml_file, tree) File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 601, in write_xml_modules libgis_revison = grass.version()['libgis_revision'] KeyError: 'libgis_revision' > execGRASS(cmd = "r.clip", + flags = "overwrite", + parameters = list (input = "GRASS_MNS", + output = "GRASS_MNT_crop")) Error : XML content does not seem to be XML: ' No such file or directory' De plus : Warning message: In system(cmd0, intern = TRUE) : l'exécution de la commande 'r.clip.bat --interface-description' renvoie un statut 2 Error in parseGRASS(cmd, legacyExec = legacyExec) : r.clip not parsed When I check the manuel of the `g.extension` function, I saw that `-s` argument in `flags` can to be use but the system administrator rights are necessary. So I have given the right at my folder where Grass 7.6 is installed and I'm administrator of my computer. When I install `r.clip` in Grass interface, installation is successfully finished but it's impossible to find `r.clip` extension in extension list of Grass. [![enter image description here][1]][1] [![enter image description here][2]][2] [1]: https://i.sstatic.net/XlqiJ.png [2]: https://i.sstatic.net/5vL9s.png But when I research `r.clip` extension in Rstudio with code below, I find it ! > execGRASS(cmd = "g.extension", + flags = "l") ATTENTION: GRASS_ADDON_BASE is not defined, installing to ~/.grass7/addons List of available extensions (modules): r.clip ... I use Grass 7.6.1 installed in `C:/Program Files/GRASS GIS 7.6` and R 3.6.1. Thanks you in advence for your help !