I recently updated my version of GDAL using the Homebrew package manager. However, now whenever I use GDAL from within my terminal shell, I get the following error:
dyld: Library not loaded: /usr/local/lib/libspatialite.2.dylib
Referenced from: /usr/local/bin/gdaladdo
Reason: image not found
Trace/BPT trap: 5
GDAL commands that are made from within QGIS, however, still work. (I'm assuming that a path needs to be updated, but have no idea how to proceed).
Best Answer
The GDAL version of QGIS:
and has nothing to do with Homebrew.
All the Frameworks of Kyngchaos are compiled to to work together. The libspatialite.x.dylib are in /Library/Frameworks/SQLite3.framework/Versions/3/unix/lib and not in /usr/local/lib/
So in the same way, you can use spatialite in the shell
The GDAL version of Homebrew:
Your problem with Homebrew is that you must also install/upgrade the Spatialite Homebrew version. This is not done automatically as in the Frameworks of William Kyngesburye.
That's why I always use these frameworks (for not having n versions of GDAL and Spatialite).