org.im4java.core.CommandException: org.im4java.core.CommandException: /usr/local/bin/gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
原因:GraphicsMagick-LATEST17.tar.gz 安装
gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
错误,无法访问libpng15.so.15
问题原因,不能访问到 libpng12.so.15对象文件
一般情况libpng12.so.15是gm支持png格式图片的库文件,一般放在/usr/local/lib下,查看路径下确实存在此库文件,把路径/usr/local/lib添加到/etc/ld.so.conf中,
更新ldconfig -v 更新动态链接库
解决方案:
# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig
问题解决