So I recently performed a brew upgrade/update and post that I have been seeing the following error while starting my django server
OSError: dlopen(/usr/local/opt/gdal/lib/libgdal.dylib, 0x0006): Library not loaded: /usr/local/homebrew/opt/libtiff/lib/libtiff.5.dylib
Referenced from: <33E7E7D2-EDA5-33CC-AFB4-2F35C8A1E369> /usr/local/opt/gdal/lib/libgdal.32.3.6.4.dylib
Reason: tried: '/usr/local/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file), '/usr/local/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file, not in dyld cache), '/usr/local/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file), '/usr/local/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file, not in dyld cache)
When checking in the respective location, I'm seeing that the libtiff file that my system has is
$ pwd
/usr/local/homebrew/opt/libtiff/lib
$ ls
libtiff.6.dylib libtiffxx.6.dylib pkgconfig
libtiff.a libtiffxx.a
libtiff.dylib libtiffxx.dylib
$ pwd
/usr/local/opt/gdal/lib
$ ls
cmake libgdal.32.dylib python3.11
gdalplugins libgdal.dylib
libgdal.32.3.6.4.dylib pkgconfig
So it seems as if my system is looking for libtiff.5.dylib but my current version installed is libtiff.6.dylib.
How do i resolve this?
The problem started when i installed the new mac os 17, sanoma and non of my libraries was working.
This fixed it for me.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"