Lucid Ubuntu and GDAL Latest

I’m writing some software that relies on a feature of GDAL (Geospatial Data Abstraction Library) in a more recent version than the one Ubuntu Lucid currently has in their repository. As I write the software on my desktop, I found out pretty quickly that I was using an old version of one of the commands (more specifically ogr2ogr and the clipping functionality).

Thanks to this site for the initial tip, it’s pretty easy to get the latest “unstable” release of GDAL installed without having to manually compile the program from source code yourself.

If you are using Karmic or above, you can run these commands:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable

Or you can opt for the more involved version below:

In your desktop, navigate to here:
System -> Administration -> Software Sources
“Other Software” tab

Add these two items:

deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main 
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main 

Where in my case, would be lucid…

You will also need to run from a terminal:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160 
sudo apt-get update

If you don’t have GDAL installed, you can install it from the terminal by:

sudo apt-get install gdal-bin python-gdal

“python-gdal” being optional…

Otherwise, you can use the standard Ubuntu update program to install the newest version on your computer:
System -> Administration -> Update Manager
Run through that and you should see a new version of GDAL show up to be installed. Install those updates to get the newest version!

This entry was posted in General and tagged , , , , . Bookmark the permalink.