<?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%8FUtsav</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%8FUtsav"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FUtsav"/>
	<updated>2026-04-18T02:30:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=11242</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=11242"/>
		<updated>2010-08-04T17:32:36Z</updated>

		<summary type="html">&lt;p&gt;⚠️Utsav: /* GEOS */ bunzip gave me a command not found, tried bunzip2 worked fine, after unzipping the extension changes to tar&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;
  libhdf4g-dev libhdf4g-run \&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;
* 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;
&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>⚠️Utsav</name></author>
	</entry>
</feed>