Compile and Install Ubuntu
This page shall help to install the latest GRASS on Ubuntu based systems.
Current Release Branch
The manual is based on Ubuntu 9.04.
sudo apt-get update && sudo apt-get upgrade
- install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR
sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev libjpeg62-dev libgdal1-dev libtiff4-dev libgcc1 tcl8.4-dev tk8.4-dev fftw3-dev libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libgdal1-dev libreadline5 libreadline5-dev make python-dev python-wxversion swig libavutil-dev libavutil49
sudo apt-get build-dep grass
- install SQLite
sudo apt-get install sqlite3 libsqlite3-dev
- install SVN
sudo apt-get install subversion
- create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called src under /usr/local)
sudo mkdir /usr/local/src
- grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):
sudo chown userid:groupid /usr/local/src
sudo chmod ug+rwx /usr/local/src
- download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)
svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass_current
- Above command places GRASS' source code in /usr/local/src/grass_trunk. In case of a subsequent update use the command: svn up from within the grass_trunk directory
Before attempting to compile GRASS, READ section (C) in the INSTALL file located in the main directory of GRASS source code entitled: (C) COMPILATION NOTES for 64bit platforms
not yet succeeded.
go for GRASS!
- in our example we used the /usr/local/src directory to store GRASS' source code, so:
CFLAGS="-g -Wall" ./configure --with-cxx --with-freetype=yes \ --with-postgres=no --with-sqlite=yes --enable-largefile=yes \ --with-tcltk-includes=/usr/include/tcl8.4 \ --with-freetype-includes=/usr/include/freetype2 \ --with-opengl-libs=/usr/include/GL --with-readline \ --with-python=yes --program-suffix=-svn --with-proj-share=/usr/share/proj
- compilation is expected to end with a statement similar to the following:
Started compilation: Wed Feb 27 00:24:36 CET 2008 -- Errors in: No errors detected.
- launch 64-bit GRASS.6.4.svn
- in case of errors in future compilation attempts, remember to remove program binaries with
- and the files created with the "configuration" from previous compilations with
Current Development Branch
not yet succeeded.