Hello, I'm new to caffe and I'm installing it on my MacbookPro (Yosemite). Everything is fine except the final step "make runtest". It throws the following error:
.build_release/tools/caffe
dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/opt/opencv/lib/libopencv_highgui.2.4.dylib
Reason: image not found
make: *** [runtest] Trace/BPT trap: 5
I've located libpng16.6:
locate libpng16.16.dylib
/Library/Python/2.7/site-packages/matplotlib/.dylibs/libpng16.16.dylib
/usr/local/Cellar/libpng/1.6.21/lib/libpng16.16.dylib
Can you help fix?
I'm guessing you're using homebrew. You need to make sure homebrew has linked your libpng in /usr/local/lib. Try fixing it using "brew link libpng". On a sidenote: This is a usage-related question and should probably be moved to the mailing list. I think it's safe to close the issue.
Thank you. Your suggestion works for me. Everything worked after I ran the command below:
brew link --overwrite libpng
you might need to change permissions too : https://thornelabs.net/2014/12/08/libpng-not-symlinking-when-installing-imagemagick-on-os-x-yosemite.html
Run the following
sudo chown -R my_osx_short_username:admin /usr/local/share/man/man5
brew link libpng
My application would accept certain images then reject others with similar error messages.
ERROR in ./src/images/cat.png
Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Reason: image not found
My fix was a reinstall of libpng 馃挬 https://github.com/tcoopman/image-webpack-loader/issues/60
brew install libpng
Most helpful comment
I'm guessing you're using homebrew. You need to make sure homebrew has linked your libpng in /usr/local/lib. Try fixing it using "brew link libpng". On a sidenote: This is a usage-related question and should probably be moved to the mailing list. I think it's safe to close the issue.