Total Pageviews

Friday 10 June 2016

err: dyld: Symbol not found: __cg_jpeg_resync_to_restart的解决办法

http://briteming.blogspot.com/2016/06/sockstunnel.html里面,我运行了export DYLD_LIBRARY_PATH=/usr/local/lib/,然后克隆其他源码时,遇到了错误:
err: dyld: Symbol not found: __cg_jpeg_resync_to_restart

解决办法如下:
Fortunately it’s simple to fix, helped in part by the fact that Homebrew links binaries and libraries. We’ll just need to re-link some image dylib files back to the ImageIO framework package, remembering to remove the problematic links first:

Solution is to delete some dlylibs in the /usr/local/lib directory and create symbolic links to related files /System/Library/Frameworks/ImageIO.framework/Resources/
$ 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
I had a similar error, and i solved putting the following variable in my bash_profile:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib/
from http://stackoverflow.com/questions/17643509/conflict-between-dynamic-linking-priority-in-osx
https://www.alfresco.com/blogs/developer/2012/12/11/homebrew-share-thumbnails-and-previews-on-os-x/