I successfully installed QGIS on my iMac with OS X 10.9.1 Mavericks using the installers provided by Kyngchaos. However, I'm having troubles accessing GDAL / ogr from terminal. It's giving me the following error message:

-bash: ogr2ogr: command not found

Does anybody have an idea of how to resolve this?


You must understand the PATH and the $PATH variable on POSIX and Unix-like operating systems (as Mac OS X, look at The PATH Variable) and BASH

The GDAL programs of Kyngchaos, as Laurent Jégou says, are installed in


enter image description here

so, in the terminal, use the command:

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH

enter image description here

If you do not want to write it every time, put this line in your .bash_profile file in /Users/you/ (hidden file, look at Hidden file and hidden directory):

enter image description here

Portion of my .bash_profile file

enter image description here

And each time you open Terminal.app, you automatically get the right paths:

enter image description here

  • The export PATH workaround is working for me, thank you. But I'm unable to locate the .bash_profile file on my machine. I set all files to visible and searched it with finder but no result. Is it possible that this file is called differently on Mavericks? Thanks again, Ralf – Ralf Glaser Dec 20 '13 at 10:08
  • 1
    you can create one (name = .bash_profile) – gene Dec 28 '13 at 17:05

Try "locate ogr2ogr", it will give you the full path of the tool.

On my own 1.10 install, its "/Library/Frameworks/GDAL.framework/Versions/1.10/Programs/ogr2ogr"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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