今日碰到服务迁移时,图片裁剪程序不正常的问题。
看到php的错误日志有类似信息:
可能是版本的问题,导致部分参数不支持,所以出错了。
遂安装高版本尝试:
http://sourceforge.net/projects/imagemagick/files/
安装6.4以上的应该就支持该参数,因为测试环境是此版本,安装的是6.6
运行的时候出错:
有两个解决方法:
1 运行 /sbin/ldconfig –v 更新
2 运行前执行 export LD_LIBRARY_PATH=/usr/local/lib
参考:
1 http://www.tuskdesign.com/blog/imagemagick_command_line_problem
2 http://www.cnblogs.com/amboyna/archive/2008/02/06/1065322.html
原创内容如转载请注明:来自 阿权的书房
看到php的错误日志有类似信息:
Mar 25 18:10:10.978153 [WARNING] fpm_stdio_child_said(), line 192: child 7035 (pool default) said into stderr: "convert: invalid argument for option `135x110^': -thumbnail.", pipe is closed
可能是版本的问题,导致部分参数不支持,所以出错了。
遂安装高版本尝试:
http://sourceforge.net/projects/imagemagick/files/
安装6.4以上的应该就支持该参数,因为测试环境是此版本,安装的是6.6
运行的时候出错:
error while loading shared libraries:
libMagickCore.so.2: cannot open shared object file: No such file or directory
libMagickCore.so.2: cannot open shared object file: No such file or directory
有两个解决方法:
1 运行 /sbin/ldconfig –v 更新
2 运行前执行 export LD_LIBRARY_PATH=/usr/local/lib
引用
problem: convert: error while loading shared libraries: libMagickCore.so.2: cannot open shared object file: No such file or directory
solution: export LD_LIBRARY_PATH=/usr/local/lib
solution: export LD_LIBRARY_PATH=/usr/local/lib
引用
行程式時,如此遇到像下列這種錯誤:
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
那就表示系統不知道xxx.so 放在哪個目錄下。
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。
一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。
將 /etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
那就表示系統不知道xxx.so 放在哪個目錄下。
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。
一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。
將 /etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。
参考:
1 http://www.tuskdesign.com/blog/imagemagick_command_line_problem
2 http://www.cnblogs.com/amboyna/archive/2008/02/06/1065322.html
原创内容如转载请注明:来自 阿权的书房
收藏本文到网摘
网站搬迁小笔记
独立的多个fastcgi端口服务
