Skip to content

Instantly share code, notes, and snippets.

@VehpuS
Created January 21, 2022 08:47
Show Gist options
  • Save VehpuS/f2cebe5cb5db19b7856126236b04b10b to your computer and use it in GitHub Desktop.
Save VehpuS/f2cebe5cb5db19b7856126236b04b10b to your computer and use it in GitHub Desktop.
How to install GDAL on a new Mac (hint: not brew, surprisingly)

Common

On Mac OS X you can install the “GDAL Complete” Framework from kyngchaos.com.

GDAL applications are run through the Mac OS X Terminal. The first time you install the GDAL package there is one additional step to make sure you can access these programs. Open the Terminal application and run the following commands:

New Oses (zsh):

vi ~/.zshenv

Add the following

# prepend
path=(/Library/Frameworks/GDAL.framework/Programs $path)
# export to sub-processes (make it inherited by child processes)
export PATH

Old OSes (bash):

echo 'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.bash_profile
source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment