Skip to content

Instantly share code, notes, and snippets.

@nebgnahz
Created August 31, 2016 17:43
Show Gist options
  • Save nebgnahz/ea392742364ea7c368266d14104dd74d to your computer and use it in GitHub Desktop.
Save nebgnahz/ea392742364ea7c368266d14104dd74d to your computer and use it in GitHub Desktop.
OpenCV __cg_jpeg_resync_to_restart
dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
error: Process didn't exit successfully: `target/debug/main` (signal: 5, SIGTRAP: trace/breakpoint trap)

Similarly for libTIFF.dylib, etc.

Solution (from SO)

cd /usr/local/lib
rm libgif.dylib
ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libGIF.dylib libGIF.dylib
rm libjpeg.dylib
ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libJPEG.dylib libJPEG.dylib
rm libtiff.dylib
ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libTIFF.dylib libTIFF.dylib
rm libpng.dylib
ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libPng.dylib libPng.dylib
@DerPauli
Copy link

Great, helped me a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment