If you’ve ever compiled your own LibJPEG then perhaps you’ve come across this error, or something like it:
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Expected in: /path/to/your/libJPEG.dylib
I struggled with this yesterday after running OSX software update. I couldn’t log in to my account.
The solution is to move any of the libraries that you’ve installed yourself that are also referenced in the
path, namely libGIF, libJP2, libJPEG, libOpenEXR, libPng, libRadiance and libTIFF, into the DYLD_FALLBACK_LIBRARY_PATH env variable instead of DYLD_LIBRARY_PATH.
Apparently, DYLD_FALLBACK_LIBRARY_PATH will look in the place you’ve specified first then fallback to looking in system libraries.
My ~/.zprofile (or if you’re on bash, ~/.bash_profile) now looks like this:
DYLD_FALLBACK_LIBRARY_PATH="/Library/Frameworks/LibTIFF.framework/Libraries:/Library/Frameworks/LibJPEG.framework/Libraries:/Library/Frameworks/LibPNG.framework/Libraries:$DYLD_FALLBACK_LIBRARY_PATH" export DYLD_FALLBACK_LIBRARY_PATH
Be sure to look for anywhere you may have these env vars set. I also had to change them in the ~/.MacOSX/environment.plist before I could access my account again.