- Homebrew is installed
- GDAL 1.x is installed using homebrew
- Unlink GDAL 1.x
brew unlink gdal
- Tap into osgeo4mac
brew tap osgeo/osgeo4mac && brew tap --repair
- Install GDAL 2.x
brew install jasper netcdf # gdal dependencies
brew install gdal2 --with-armadillo \
--with-complete --with-libkml --with-unsupported
- Link to GDAL 2.x
brew link --force gdal2
- 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