Skip to content

Instantly share code, notes, and snippets.

@chringel21
Last active July 26, 2017 08:11
Show Gist options
  • Save chringel21/385f22918361ee66cc12fbb90c93cd0a to your computer and use it in GitHub Desktop.
Save chringel21/385f22918361ee66cc12fbb90c93cd0a to your computer and use it in GitHub Desktop.
Install GDAL 2.x on Mac using Homebrew

Pre-Requisites

  1. Homebrew is installed
  2. GDAL 1.x is installed using homebrew

Install GDAL 2.x

  1. Unlink GDAL 1.x
brew unlink gdal
  1. Tap into osgeo4mac
brew tap osgeo/osgeo4mac && brew tap --repair
  1. Install GDAL 2.x
brew install jasper netcdf # gdal dependencies
brew install gdal2 --with-armadillo \
--with-complete --with-libkml --with-unsupported
  1. Link to GDAL 2.x
brew link --force gdal2
  1. Check version
$ gdal-config --version
2.1.1
$ gdal-config --libs
-L/usr/local/Cellar/gdal2/2.1.1/lib -lgdal
$ gdal-config --cflags
-I/usr/local/Cellar/gdal2/2.1.1/include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment