caffe installation : opencv libpng16.so.16 linkage issues

馋奶兔 提交于 2019-12-05 12:29:05

I came across the same problem. I found it similar to https://github.com/BVLC/caffe/issues/2007, and I solved it by

cd /usr/lib/x86_64-linux-gnu
sudo ln -s ~/anaconda/lib/libpng16.so.16 libpng16.so.16
sudo ldconfig

It works with me based on the solution here https://github.com/hashdist/hashstack/issues/670

export LD_LIBRARY_PATH=~/anaconda2/lib:$LD_LIBRARY_PATH

This shall be added in ~/.bashrc or ~/.bash_profile

deephelper

I'm guessing you've added /home/andrei/anaconda/bin to the PATH environment variable, so that libpng-config resolves to /home/andrei/anaconda/bin/libpng16-config, which is what is causing cmake to try and link with libpng v1.6.

Strip the anaconda dir from your PATH environment variable and libpng-config should default to libpng v1.2 in /usr/lib or similar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!