PHP安装imagick-3.1.0RC2时提示: an error occur: fatal error: wand/MagickWand.h: No such file or directory 解决办法: 1.确认已安装 ImageMagick 2.安装pkgconfig 1 2 yum install gtk-devel ,可能是yum install gtk2-devel export PKG_CONFIG_PATH=/us
an error occur: fatal error: wand/MagickWand.h: No such file or directory
解决办法:
1.确认已安装 ImageMagick
2.安装pkgconfig
1 2 |
|
确认ImageMagick 的安装目录是这个目录
3.重新安装PHP扩展:imagick
1 2 3 4 5 6 7 8 |
|
Ever go the following error while setting up ImageMagick?
“configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.”
Don’t panic. It’s a simple one and we can fix this right away. You are getting this error because you have only installed the “ImageMagick” package. You need to also install “ImageMagick-devel” and that will fix all the issues.
yum install ImageMagick-devel
That’s it!! Issue solved.
4. 配置使PHP加载imagick 扩展
1 |
|
#搜索 extension_dir, PHP 5.3.x中 extension_dir 的默认值一般设置成
#/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
添加一行记录
1 2 3 |
|
重启PHP, lnmpa 环境下,重启 Apache 即可
1 |
|
ImageMagick http://www.imagemagick.org/script/download.php
imagick-3.1.0RC2 最新版下载 http://pecl.php.net/package/imagick
1 2 3 4 5 6 7 |
|
1 |
|
如果没有提示任何错误,然后检查执行命令时所在的目录 看看是否生成了 logo.gif 这个文件
1 |
|
查看ImageMagick 版本及配置参数
1 |
|
附录,linux下查看磁盘的剩余空间
1 |
|
本文部分内容参考 http://www.g78.net/?p=288 在此感谢
参考文案:http://www.gemingcao.com/archives/linux-imagemagick-imagick.html