I installed matplotlib via
pip install matplotlib
When I try to save png with it, I get
Application was compiled with png.h from libpng-1.6.21
libpng warning: Application is running with png.c from libpng-1.2.44
libpng error: Incompatible libpng version in application and library
ldconfig -p | grep libpng gives me
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/libpng12.so.0
libpng12.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpng12.so
I then build libpng1.6.21 from source and add its lib/ to my LD_LIBRARY_PATH. But ldconfig -p | grep libpng still gives me the samething as before. I tried rebuilding the ldconfig -- still only libpng12.
How can I let matplotlib pick up the newly installed libpng1.6.21?
Why is the new libpng1.6.21 in my LD_LIBRARY _PATH already, but not indexed by ldconfig?