Installing GDAL on Linux Ubuntu Server?

Note: this is an answer for an older version of GDAL, and there are newer versions available (including current) that can be compiled similar to this answer. Just replace the version numbers in the commands below.


Build from source, with Python bindings:

sudo apt-get install build-essential python-all-dev
wget http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz
tar xvfz gdal-1.9.0.tar.gz
cd gdal-1.9.0
./configure --with-python
make
sudo make install

In addition, some Linux distributions require the shared library cache to be updated after install:

sudo ldconfig

You can get 1.9 from Ubuntugis (see https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable).

See http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries for other sources of binaries.

Failing all else you can build 1.9 from the sources (http://trac.osgeo.org/gdal/wiki/BuildHints)


In case the question asked was still relevant, I managed to install Python-Gdal on Ubuntu 14.04 (Trusty) simply using:

apt-get install python-gdal