Skip to content

Installation on Linux (the fast way)

Damiano G. Preatoni edited this page Aug 4, 2015 · 12 revisions

I tried to install on a Debian Jessy box, with no joy. Here's my recipe for Ubuntu 13.10, tested both on Desktop (lUbuntu) and Server flavors.

Table of Contents

Base OS install

I decided to place MDiG on a dedicated server, so, first of all, download and install Ubuntu (I used the latest version as of January 2014, i.e. 13.10)

Post-installation tweaks

Some utility software, normally not present by default, needs to be installed:

 sudo apt-get install aptitude vim

As from qgis.org downloads page, I added to /etc/apt/sources.list the repositories for Quantum GIS for Ubuntu "Saucy Salamander".

 deb http://qgis.org/debian saucy main
 deb-src http://qgis.org/debian saucy main

Remember to add qgis.org gpg public key:

 gpg --keyserver keyserver.ubuntu.com --recv 47765B75
 gpg --export --armor 47765B75 | sudo apt-key add -

Install grass-dev (so we have both GRASS GIS and its source!) and Quantum GIS:

 sudo aptitude install grass-dev grass-gui
 sudo aptitude install qgis

Get MDiG

The official repository is now here on github. Create a local working copy following the instructions on this page.

Compilation and Installation

MDig needs to be compiled against some pieces of GRASS GIS source. Having installed grass-dev this step becomes really simple: actually, you don't need to compile GRASS!

The GRASS GIS source installed by grass-dev lives in /usr/lib/grass64/include (headers only!).

Compile MDiG

To properly "compile" the MDiG modules written in python you need some further libraries, not present in a standard Ubuntu install, or not installed when installing grass-dev or qgis (for this reason the list below is shorter than the original one.

 sudo apt-get install gsl-bin libgsl0-dev imagemagick python-numpy \ 
 python-scipy python-lxml python-dateutil python-simplejson

The packages listed above were those that met my requirements... YMMV, as usual. Remember to prefer Ubuntu packages, also if alternatively, you can use pip (example stanza to install scipy):

 cd ~/src/MDiG
 pip install scipy
 # Rest of python dependencies should be fine,
 # ensure you are in mdig root dir
 pip install -r requirements.txt

Finally, compile MDiG GRASS-dependant modules.

 cd grass-modules
 sudo make MODULE_TOPDIR=/usr/lib/grass64
 make install

...and you're done.

Test if everything runs

Launch GRASS, from GRASS console issue:

  cd ~/src/MDiG/mdig
  ./mdig.py --help