error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file

created at 09-27-2021 views: 1

description

Run the compiled demo program, the error is as follows:

./demo: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory

Check that libpng exists through the command:

ldconfig -p | grep libpng
libpng12.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libpng12.so.0
libpng12.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpng22.so.0

solution

apt-get install libpng16-dev

Please log in to leave a comment.