http://applications.linux.com/applications/06/01/25/1548238.shtml?tid=47
http://www.linuxjournal.com/article/2751
Tips & Tricks for Grass on Ubuntu Dapper 6.06
Installation
Stuff
Quelques conseils (peu utiles)
http://hamish.bowman.googlepages.com/debiangisfiles#compile
http://lists.tartarus.org/pipermail/survex/2006-June/001235.html
Exemple of error during "make":
Error:
In lib/gis:
/usr/bin/ld: ne peut trouver -lgrass_datetime
collect2: ld a retourné 1 code d'état d'exécution
make: * * * [/media/sda7/proglinux/grass-6.2.0/dist.i686-pc-linux-gnu/lib/libgrass_gis.6.2.0.so] Erreur 1
http://www.ubuntuforums.org/showthread.php?p=1809929#post1809929
Step by step
This is a step by step installation procedure for GRASS-6.x.x on Linux Ubuntu Dapper Drake 6.06.
Grass developers usually provide a generic debian version of the latest stable Grass release, but it is not properly working on many Debian based systems, such as Ubuntu 6.06. Ubuntu developers also provide a package for Grass (that can be installed directly with Synaptic), but of an outdated version.
This procedure should be helpful for other Linux systems, especially Debian based.
Preliminaries:
Install Checkinstall:
> sudo apt-get checkinstall
Install Build-essential:
> sudo apt-get install build-essential
Download and Extract:
Download the source code to a directory of your local disk, for example /home/src. You get the source code from
http://grass.itc.it/download/index.php . Move to that directory and then extract the source code from the .tar.gz archive:
> tar -xvf grass-6.x.x.tar.gz
Move into the folder:
> cd /grass-6.x.x
(! Don't forget!!).
Requirements:
See the file
REQUIREMENT.html in the source code for a list of all the requirements. Most of the requirements should be installed already, except maybe GDAL and
Proj4. If you have a package manager (like Synaptic in GNOME or Adept in KDE), you can easily find and install the missing packages. Or use:
> sudo apt-get update
> sudo apt-get install nameofthemissingpackage
If it does not work, download source codes from the missing packages (see
REQUIREMENTS.html) and compile...
Configuration, Compilation and Install:
Follow the instructions given in the "INSTALL" file inside the .tar.gz archive, but INSTEAD of doing "make install", do "sudo checkinstall".
1: configure:
> CFLAGS="-g -Wall" sudo ./configure --with-cxx --with-gdal=/usr/bin/gdal-config --with-tcltk-includes=/usr/include/tcl8.4/ --with-postgres-includes=/usr/include/postgresql/
This is the configuration that worked for me on Ubuntu Dapper Drake 6.06. Start using:
> CFLAGS="-g -Wall" sudo ./configure
and if the configuration returns error, either:
- install missing packages (see "Requirements" above), or
- use options to explain where are some packages that were not found.
For example in my case tcltk-includes was not found although this package was installed. The following error was returned:
"checking for location of Tcl/Tk includes...
checking for tcl.h... no
configure: error: * * * Unable to locate Tcl includes."
I used:
> locate tcl.h
to find the file, it was in and then added this to the configuration command:
"--with-tcltk-includes=/usr/include/tcl8.4/"
2: compilation:
> make
If there were no errors in the configuration, this should work fine. In my case it didn't work at the beginning because I was working on a logical partition of my hard disk that was different than the linux home partition.
If error during this step, see the list of directories where errors occured, and try:
> cd /path_to_the_error_directory
> make
and see what the error was (last few lines before it dies).
3: installation:
> sudo checkinstall -D
This will install GRASS and produce a .deb package inside the same directory as the source code, so that you can later easily remove / reinstall GRASS using Debian Package Manager.
If you do not want to use checkinstall, use:
> make install
(maybe sudo is needed there also ?)
Install QuantumGIS and Grass Plugin for QGIS:
To be continued ... This is an easy step.
Tips
Add modules
http://grass.itc.it/faq/install_extra_modules.html
Aggregate a raster with
r.resamp.stats
http://casoilresource.lawr.ucdavis.edu/drupal/node/275