<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FMuelleki</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FMuelleki"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FMuelleki"/>
	<updated>2026-07-08T13:50:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=12203</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=12203"/>
		<updated>2010-12-15T08:41:31Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Ubuntu 8.04 and 9.04 */ instructions apply to Ubuntu 10.x as well&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
== How to do compilation and installation of GRASS 6? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.itc.it/grass61/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://proj.maptools.org PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://geos.refractions.net GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for QGIS)&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first'''.&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
Then [http://grass.osgeo.org/download/index.php#g64x download GRASS] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  JPEG support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass63&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging [http://svn.debian.org/viewsvn/pkg-grass/packages/grass/ control files], also accessible via svn:&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev swig libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
   tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
   libmysqlclient-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
   python-dev swig libgdal1-dev libgdal1-1.6.0 libproj-dev proj-bin libglw1-mesa-dev \&lt;br /&gt;
   mysql-client-5.1 mysql-server-5.1 libpq-dev subversion gcc lesstif2-dev \&lt;br /&gt;
   zlib1g-dev libproj-dev libtiff4-dev mesa-common-dev libglu1-mesa-dev libcairo2-dev \&lt;br /&gt;
   g++ wx-common python-wxgtk2.8 libwxgtk2.8-dev libxt-dev libxmu-headers gettext python-numpy&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-motif --with-glw --with-nls --with-readline \&lt;br /&gt;
  --with-cxx --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-odbc --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.5 --with-tcltk-libs=/usr/lib/tcl8.5 \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
''The above Debian notes will probably work with Ubuntu as well.''&lt;br /&gt;
&lt;br /&gt;
A more  [[Compile_and_Install_Ubuntu | specific page]] towards Ubuntu is being written on.&lt;br /&gt;
&lt;br /&gt;
====== Ubuntu 6.06, 7.10 ======&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
====== Ubuntu 7.10 64-bit ======&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libjpeg62-dev libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion swig&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* 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''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* 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&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
====== Ubuntu 8.04 and above ======&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and Install Ubuntu‎]]&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ swig gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ swig gettext \&lt;br /&gt;
          lib64jpeg-devel lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
&lt;br /&gt;
Preparation:&lt;br /&gt;
  yum install flex bison zlib-devel  tcl-devel tk-devel gcc-c++ swig gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel libjpeg-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile and install [http://proj.osgeo.org PROJ4]:&lt;br /&gt;
&lt;br /&gt;
 # get source code and unpack:&lt;br /&gt;
 wget http://download.osgeo.org/proj/proj-4.7.0.tar.gz&lt;br /&gt;
 tar xvfz proj-4.7.0.tar.gz &lt;br /&gt;
 rm -f proj-4.7.0.tar.gz &lt;br /&gt;
 cd proj-4.7.0/&lt;br /&gt;
 &lt;br /&gt;
 # get and install datum files into right directory:&lt;br /&gt;
 cd nad/&lt;br /&gt;
 wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
 rm -f proj-datumgrid-1.5.zip&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
 # configure and compile&lt;br /&gt;
 sh configure&lt;br /&gt;
 make -j4&lt;br /&gt;
 &lt;br /&gt;
 # install (may require &amp;quot;root&amp;quot; permissions, use &amp;quot;su&amp;quot;):&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Compile and install [http://www.gdal.org GDAL]:&lt;br /&gt;
 # get source code and unpack:&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-1.6.3.tar.gz&lt;br /&gt;
 tar xvfz gdal-1.6.3.tar.gz &lt;br /&gt;
 rm -f gdal-1.6.3.tar.gz &lt;br /&gt;
 cd gdal-1.6.3/&lt;br /&gt;
 &lt;br /&gt;
 # configure and compile&lt;br /&gt;
 sh configure&lt;br /&gt;
 make -j4&lt;br /&gt;
 &lt;br /&gt;
 # install (may require &amp;quot;root&amp;quot; permissions, use &amp;quot;su&amp;quot;):&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 # add /usr/local/lib/ to LD_LIBRARY_PATH, requires &amp;quot;root&amp;quot; permissions:&lt;br /&gt;
 su - &lt;br /&gt;
 echo &amp;quot;/usr/local/lib&amp;quot; &amp;gt; /etc/ld.so.conf.d/gdal.conf&lt;br /&gt;
 ldconfig&lt;br /&gt;
 exit&lt;br /&gt;
 &lt;br /&gt;
 # test installation by running&lt;br /&gt;
 gdalinfo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GRASS 7 compilation and installation, here 64bit example:&lt;br /&gt;
&lt;br /&gt;
1. Download wxGTP and wxPython:&lt;br /&gt;
&lt;br /&gt;
  wget http://packages.sw.be/wxPython/wxPython-2.8.9.1-1.el5.rf.x86_64.rpm&lt;br /&gt;
  wget http://packages.sw.be/wxPython/wxPython-devel-2.8.9.1-1.el5.rf.x86_64.rpm&lt;br /&gt;
  wget http://packages.sw.be/wxGTK/wxGTK-2.8.9-1.el5.rf.x86_64.rpm&lt;br /&gt;
  wget http://packages.sw.be/wxGTK/wxGTK-devel-2.8.9-1.el5.rf.x86_64.rpm&lt;br /&gt;
 &lt;br /&gt;
  # Install:&lt;br /&gt;
  rpm -Uhv wxPython-2.8.9.1-1.el5.rf.x86_64.rpm wxPython-devel-2.8.9.1-1.el5.rf.x86_64.rpm \&lt;br /&gt;
           wxGTK-2.8.9-1.el5.rf.x86_64.rpm wxGTK-devel-2.8.9-1.el5.rf.x86_64.rpm&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
2. [http://grass.osgeo.org/download/ Download] and configure GRASS 7 (suggestion: save this as script). Note that [http://proj.osgeo.org PROJ4] and [http://www.gdal.org GDAL] must be compiled first:&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-libs=/usr/lib64 \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --without-fftw \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-pthread&lt;br /&gt;
&lt;br /&gt;
3. Hack the Makefile of GRASS-SWIG since python-config isn't there (add one line without the '+'):&lt;br /&gt;
&lt;br /&gt;
  svn diff swig/&lt;br /&gt;
  Index: swig/python/Makefile&lt;br /&gt;
  ===================================================================&lt;br /&gt;
  --- swig/python/Makefile        (revision 38916)&lt;br /&gt;
  +++ swig/python/Makefile        (working copy)&lt;br /&gt;
  @@ -36,6 +36,7 @@&lt;br /&gt;
   EXTRA_SWIG = ../include/python/my_typemaps.i ../include/python/common.i&lt;br /&gt;
   SWIGFLAGS = $(INC) -I../include/python -outdir .&lt;br /&gt;
   EXTRA_CFLAGS = $(PYMOD_CFLAGS)&lt;br /&gt;
  +EXTRA_LIBS = -lpython2.4&lt;br /&gt;
   EXTRA_CLEAN_FILES := $(foreach M,$(MODULES),$(M)_wrap.o $(M)_wrap.c $(M).pyc $(M).py _$(M).so)&lt;br /&gt;
   CLEAN_SUBDIRS = NumPtr&lt;br /&gt;
&lt;br /&gt;
4. Add manually the path to the python include directory since python-config isn't there:&lt;br /&gt;
&lt;br /&gt;
   # edit include/Make/Platform.make&lt;br /&gt;
   # and add manually the line&lt;br /&gt;
 &lt;br /&gt;
   PYTHONINC           = -I/usr/include/python2.4&lt;br /&gt;
&lt;br /&gt;
5. Compile&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore:&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
6. Either install with &amp;quot;make install&amp;quot; or run directly from compile directory (substitute ARCH with i586 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -wx&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
This is an example how to compile GRASS on a 64bit Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --enable-64bit \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-libs=/usr/lib64 \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --without-tcltk \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --without-cairo \&lt;br /&gt;
   --without-opengl \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-blas \&lt;br /&gt;
   --with-lapack \&lt;br /&gt;
   --without-freetype \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --with-x \&lt;br /&gt;
   --x-includes=/usr/include/X11/&lt;br /&gt;
&lt;br /&gt;
An effective (but not fast) way of getting dependencies is to decide what to enable in the configuration, and then run ./config and see which files are missing. The package providing it can be found via:&lt;br /&gt;
&lt;br /&gt;
 yum provides */&amp;lt;name of the file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then installed with your favourite package manager frontend.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
* see the source/macosx readme&lt;br /&gt;
* also see [[Compiling on MacOSX]]&lt;br /&gt;
* some notes on [[Packaging on MacOSX]]&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
... see [http://grass.itc.it/platforms/wingrass.html here] (should be moved to the Wiki)&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x)&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x)&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GDAL plugin ===&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Compiled C modules ===&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12143</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12143"/>
		<updated>2010-11-24T03:54:17Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: Undo revision 12142 by Muelleki (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; also install all extra packages queried for (''The following extra packages will be installed:''):&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (''The following extra packages will be installed:''). Look out for packages to be removed by this operation -- this is most likely caused by incompatible package version. Fix these problems in advance using commands like the following:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal_stable&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12142</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12142"/>
		<updated>2010-11-24T03:32:18Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* GRASS */ use checkinstall&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; also install all extra packages queried for (''The following extra packages will be installed:''):&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (''The following extra packages will be installed:''). Look out for packages to be removed by this operation -- this is most likely caused by incompatible package version. Fix these problems in advance using commands like the following:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal_stable&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo checkinstall &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12141</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12141"/>
		<updated>2010-11-24T03:31:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: move ffmpeg dependencies to head&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; also install all extra packages queried for (''The following extra packages will be installed:''):&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (''The following extra packages will be installed:''). Look out for packages to be removed by this operation -- this is most likely caused by incompatible package version. Fix these problems in advance using commands like the following:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal_stable&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12140</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12140"/>
		<updated>2010-11-24T03:25:22Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Compiled from source */ fix inconsistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
* Install also the required packages (''The following extra packages will be installed:''). Look out for packages to be removed by this operation -- this is most likely caused by incompatible package version. Fix these problems in advance using commands like the following:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal_stable&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12139</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12139"/>
		<updated>2010-11-24T03:22:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Packaged version */ add caveat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
* Install also the required packages (''The following extra packages will be installed:''). Look out for packages to be removed by this operation -- this is most likely caused by incompatible package version. Fix these problems in advance using commands like the following:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12138</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12138"/>
		<updated>2010-11-24T03:19:17Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Dependencies */ fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* for Ubuntu Lucid Lynx (10.04) or later, also install:&lt;br /&gt;
 sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* for earlier Ubuntu versions, also install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12137</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12137"/>
		<updated>2010-11-24T03:17:49Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* GDAL */ optionally use packaged version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libgdal-dev&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12136</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12136"/>
		<updated>2010-11-24T03:16:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Packaged version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-proj-share=/usr/local/share/proj/'' by ''--with-proj-share=/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12135</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12135"/>
		<updated>2010-11-24T03:16:08Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* GEOS */ option to install from packaged version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''/usr/local/share/proj/'' by ''/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version, or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
 sudo apt-get install libgeos-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''--with-geos=/usr/local/bin/geos-config'' by ''--with-geos=/usr/bin/geos-config''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12134</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12134"/>
		<updated>2010-11-24T03:13:14Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* PROJ4 */ option to use packaged version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
Use either the packaged version (possibly without support for datumgrid), or compile from source:&lt;br /&gt;
&lt;br /&gt;
=== Packaged version ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libproj-dev&lt;br /&gt;
&lt;br /&gt;
* In the call to ''./configure'' for [[#GRASS|GRASS]], replace ''/usr/local/share/proj/'' by ''/usr/share/proj/''&lt;br /&gt;
&lt;br /&gt;
=== Compiled from source ===&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) checkout proj from its Subversion repository:&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12133</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12133"/>
		<updated>2010-11-24T03:04:43Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4-0-alt&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) download '''proj-4.7.0.tar.gz'''&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12132</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=12132"/>
		<updated>2010-11-24T03:00:51Z</updated>

		<summary type="html">&lt;p&gt;⚠️Muelleki: /* Dependencies */ prepare correction of package info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MoveToTrac}}&lt;br /&gt;
&lt;br /&gt;
The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update the wiki respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. This is by far the simplest and fastest solution.&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the ''debian/'' directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes for testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for end-users.&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Installation of a compiled code can be done by using the tool ''checkinstall'' (i.e., ''sudo checkinstall'' instead of ''sudo make install'') which makes removal of packages easier.&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors compilation performance can be boosted with ''-j'' switches (e.g. ''make -j2'' or ''make -j4'') which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* update the system from the repositories&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install SQLite, SVN and dependencies for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN:&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  make flex bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  swig swig1.3 \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  sip4 python-sip4 python-sip4-dev python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  libgsl0-dev \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libjpeg62-dev libtiff4-dev libpngwriter-dev \&lt;br /&gt;
  tcl8.4-dev tk8.4-dev \&lt;br /&gt;
  libcairo libcairo-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline5 libreadline5-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  fftw3 fftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion&lt;br /&gt;
&lt;br /&gt;
* For Ubuntu Lucid Lynx (10.04) or later, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* For earlier Ubuntu versions, install:&lt;br /&gt;
 sudo apt-get install libhdf4g-dev libhdf4g-run&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored (in this ''example'' a directory called '''src''' under '''/usr/local''' is used)&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words ''userid'' and ''groupid'' with real ''userid''):&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
== PROJ4 ==&lt;br /&gt;
&lt;br /&gt;
* within the directory ''/usr/local/src'' (create it if it does not exist) download '''proj-4.7.0.tar.gz'''&lt;br /&gt;
 svn co http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under '''proj/nad'''&lt;br /&gt;
 mv proj-datumgrid-1.5.tar.gz /usr/local/src/proj/nad&lt;br /&gt;
&lt;br /&gt;
* decompress it&lt;br /&gt;
 unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&lt;br /&gt;
== GEOS ==&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.2.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos], move to &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
 bunzip2 geos-3.2.2.tar.bz2&lt;br /&gt;
 tar xvf  geos-3.2.2.tar&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install&lt;br /&gt;
 ./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&lt;br /&gt;
* Ensure that '''/usr/local/lib''' is added to '''/etc/ld.so.conf''' and run '''/sbin/ldconfig''' afterwards&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== GDAL ==&lt;br /&gt;
&lt;br /&gt;
* GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download current stable version&lt;br /&gt;
 svn checkout https://svn.osgeo.org/gdal/branches/1.7/gdal gdal&lt;br /&gt;
&lt;br /&gt;
* enter in directory '''gdal_stable'''&lt;br /&gt;
 cd /usr/local/src/gdal_stable&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* configure&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
 --with-png=internal \&lt;br /&gt;
 --with-libtiff=internal \&lt;br /&gt;
 --with-geotiff=internal \&lt;br /&gt;
 --with-jpeg=internal \&lt;br /&gt;
 --with-gif=internal \&lt;br /&gt;
 --with-ecw=yes \&lt;br /&gt;
 --with-expat=yes \&lt;br /&gt;
 --with-expat-inc=/usr/include/ \&lt;br /&gt;
 --with-expat-lib=/usr/lib \&lt;br /&gt;
 --with-sqlite3=yes \&lt;br /&gt;
 --with-geos=yes \&lt;br /&gt;
 --with-python \&lt;br /&gt;
 --with-libz=internal \&lt;br /&gt;
 --with-netcdf \&lt;br /&gt;
 --with-sqlite \&lt;br /&gt;
 --with-threads=yes \&lt;br /&gt;
 --without-grass  \&lt;br /&gt;
 --without-ogdi \&lt;br /&gt;
 --with-pg=/usr/bin/pg_config \&lt;br /&gt;
 --with-xerces=yes&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;amp; ldconfig&lt;br /&gt;
 make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GRASS ==&lt;br /&gt;
&lt;br /&gt;
Before attempting to compile GRASS read section (C) titled ''(C) COMPILATION NOTES for 64bit platforms'' within the ''INSTALL'' file (which is located in the main directory of GRASS source code).&lt;br /&gt;
&lt;br /&gt;
''' Suport for ffmpeg '''&lt;br /&gt;
&lt;br /&gt;
* add extra dependencies to get ''ffmpeg'' support when compiling grass' source code under Ubuntu 64bit&lt;br /&gt;
 sudo apt-get install \&lt;br /&gt;
 ffmpeg ffmpeg2theora \&lt;br /&gt;
 libffmpegthumbnailer-dev \&lt;br /&gt;
 libavcodec-dev \&lt;br /&gt;
 libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable)&lt;br /&gt;
  svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&lt;br /&gt;
To download under development versions use:&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5 (reminder: * ''GRASS version 6.5 exists for development purposes and is not intended for end-users'')&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
 CFLAGS=&amp;quot;-g&amp;quot; ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64 \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/tcl8.4/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=no \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-opengl-libs=/usr/include/GL \&lt;br /&gt;
 --with-ffmpeg=yes \&lt;br /&gt;
 --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install&lt;br /&gt;
 make -j2 &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* /usr/local/grass-6.4.0svn (folder, binaries location)&lt;br /&gt;
* /usr/local/bin/grass64 (file)&lt;br /&gt;
* /usr/local/bin/gem64 (file)&lt;br /&gt;
* /home/username/.grassrc6 (file)&lt;br /&gt;
&lt;br /&gt;
If needed, remove also the source code:&lt;br /&gt;
* /usr/local/src/grass_64svn (folder, source code location)&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Muelleki</name></author>
	</entry>
</feed>