[GRASS-user] g.extension - ERROR: G_getenv(): Variable LOCATION_NAME not set

Eric Momsen eric.momsen at gmail.com
Thu Feb 9 16:53:53 EST 2012

Thanks Hamish for these answers and suggestions.  In the meantime we did
end up installing version 7, so I haven't had a chance to test it on 6.4

I was only running as root for installing the extension - I did create a
new mapset just to start grass since the root account didn't have access to
any of the other mapsets.  I hope this is OK.

Regarding version 7:  is the issue stability, that sometimes it won't work
at all?  I am a graduate student, so down time is not critical.  But if
experimental means the calculations could be incorrect, I guess that would
be more important.  One of the other students is pushing for version 7
since they like the new features.

Should spgrass work with version 7?  I saw comments in the mail archive
from over a year ago that GRASS <-> R was much better in version 6 compared
to version 7, is the situation improved now?  (It didn't work when I first
tried it, but I have not taken time to check the details yet...)


On Wed, Feb 8, 2012 at 12:52 AM, Hamish <hamish_b at yahoo.com> wrote:

> Eric wrote:
> > Not sure if I should be sending this to the mail list or
> > reporting it as a bug?  Seems I am doing everything right,
> > but I still have a lot to learn.  I hope I am missing something
> > easy???
> usually a bug report would be good, but g.extension is still
> a work in progress, so the mailing list is fine too.
> > I want to add some extensions for all users on a shared
> > virtual machine (Gnome, Debian, GRASS 6.4.2RC3 (2012) ).
> >  I have run gksudo 'grass64 -gui'
> I would hesitate to run GRASS as root. You might make it the
> owner of some files or a mapset which belongs to a regular user.
> (maybe set up an admin account to look after the PERMANENT mapset
> in a multi-user location?)
> > and used the GUI for g.extension to install an
> > extension system wide.  Below is the error I
> > received.
> simple work-around first: run g.extension as your regular user
> and then sudo copy the resulting binary from $GRASS_ADDON_PATH
> into $GISBASE/bin/. done! (make sure it is chmod a+rx)
> >  I checked the environment settings, and the
> > variable LOCATION_NAME is set.
> >
> > I then tried the Download Source option -it did download the
> > i.landsat.toar file,
> (note i.landsat.toar is now in the grass 6.5 source code too)
> > but neither of the listed commands in
> > the output would work. (The second set of output for this
> > attempt.)
> >
> > If there isn't a quick answer, would it be easier to just
> > run from source with GRASS 7?
> note i.landsat.toar is present in grass 6.5svn too.
> (and don't use trunk for work that really matters; it's
> experimental)
> > We are currently all logging into the same virtual machine,
> > so the admin efficiency of being able to deploy a package
> > isn't a big issue.
> >
> > Any suggestions?  Thanks,
> try g.extension from the command prompt, it's a different version
> than the one which runs from the GUI. Specifically it has a -s
> flag to install system-wide (same as the GUI version), but also
> a -u flag to install system-wide using sudo for the install step. AFAIK
> these are not terribly well tested so any feedback would
> be appreciated.
> > ERROR: G_getenv(): Variable LOCATION_NAME not set
> this generally happens because it didn't think you were in grass
> at the time.
> if you installed from .deb packages, make sure the grass-dev
> package is installed too.
> if you installed from source you can copy the i.landsat.toar
> source code dir into the imagery/ dir in the grass source code,
> then run "make" from in there.
> Hamish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120209/7870422a/attachment.html

More information about the grass-user mailing list