Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm having a problem loading the 'convert os gml to ogr' plugin in QGIS 1.8 running on (k)ubuntu 12.10.

Basically, clicking the plugin prompts the error:

"Please ensure that the GDAL_DATA environment variable is set and try again"

I've tried setting the environment variable via instructions here: (http://trac.osgeo.org/gdal/wiki/FAQInstallationAndBuilding#WhatisGDAL_DATAenvironmentvariable) with the terminal command "export GDAL_DATA=/usr/share/gdal/1.9" but to no avail (i'm not even sure this is the right course of action...) Any suggestions?

share|improve this question
Did you install GDAL and QGIS using the package manager? Are you sure, your GDAL installation is in default directories? –  webrian Nov 24 '12 at 14:01
Thanks for your response. Well, qgis (1.8) was installed via package manager (muon) following the adding of the precise repository listed on the qgis website. I don't recall intentionally installing gdal, so i assume it installed along with other dependencies. Gdal appears to be in /usr/share/gdal/1.9, which i assume is the default directory. –  Ben Nov 24 '12 at 23:30
How about the gdal python bindings? Available via the geospatial repository - launchpad.net/~ubuntugis/+archive/ubuntugis-unstable –  Jay Laura Nov 26 '12 at 4:27
Thanks, but i'm already using that ppa to allow installation of qgis-1.8. checked the python bindings, and even tried downgrading from 1.9.2 to 1.9.0, but the same error message is reproduced. –  Ben Nov 26 '12 at 9:27

1 Answer 1

So, solved it. Environment variables needed setting according to the KDE (rather than plain ubuntu) method. Using the instructions here (http://userbase.kde.org/Session_Environment_Variables/en) i created a script called 'gdal-qgis.sh' that contained just "export GDAL_DATA=/usr/share/gdal/1.9", and saved it to $HOME/.kde/env. Rebooted, and i can now convert. Thanks for all the suggestions.

share|improve this answer
Is it possible to add a 'Solved' tag? –  Ben Nov 26 '12 at 10:13
You should be able to accept your own answer once it gets some upvotes. –  underdark Jan 25 '13 at 12:46
If you want to set the variable for all users add export GDAL_DATA=/usr/share/gdal/1.9 to a new line in your /etc/environment file. This would be a good place for it if you ever decide to switch from KDE to a different desktop. –  HeyOverThere Jan 25 '13 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.