I am trying to start GRASS GIS from the command line in ubuntu 14.04 and i keep getting the following error:

user@computer:~$ grass
Cleaning up temporary files...
Traceback (most recent call last):
  File "/usr/bin/grass", line 1973, in <module>
  File "/usr/bin/grass", line 1854, in main
  File "/usr/bin/grass", line 1593, in clean_temp
    call([gpath("etc", "clean_temp")], stdout=nul)
  File "/usr/bin/grass", line 245, in call
    return subprocess.call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

If i open it from the icon it starts normally, but i still want to why this is happening and if there is any solution

  • Please edit and add the GRASS GIS version you are using (g.version -v), probably the issue is already solved in a newer version (if applies here). – markusN Jan 17 '17 at 20:19
  • 'g.version' prints 'GRASS 7.2.0 (2016)'. I didn't had this issue with the version 7.0.5 – opengisapprendice Jan 17 '17 at 21:29
  • Can you please post: g.version -r – markusN Jan 18 '17 at 9:51
  • 'g.version -r' returns 'GRASS 7.2.0 (2016)', 'libgis Revision: 68908', 'libgis Date: 2016-07-09 20:12:57 +0200 (Sat, 09 Jul 2016)' – opengisapprendice Jan 18 '17 at 9:58

The CLI version attempts to load the last-accessed database, location, and mapste. If that folder no longer exists, it gives an error. Try explicitly providing a database, location, and mapset:

grass /path/to/DB/LOC/PERMANENT
  • 1
    it didn't work... i still get exactly the same error with ' grass /home/ignacio/Documents/GRASS/29/ignacio'. I usually start the GUI using the command line – opengisapprendice Jan 17 '17 at 14:02
  • Please also add the mapset to the path – markusN Jan 18 '17 at 14:15

I am sorry everybody! I discovered the origin of the error, it was much simpler than than I originally thought. The problem was that the environment variable "GISBASE" in my bashrc file needed to be changed to "/usr/lib/grass72" so the system looks for grass in the correct folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.