Home  >  Article  >  php教程  >  为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法,imagick

为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法,imagick

WBOY
WBOYOriginal
2016-06-13 09:22:25931browse

为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法,imagick

今天在新服上安装php imagick,

环境如下:
php 5.4.13
ImageMagick-6.8.3-10
imagick-3.0.1

可是出错了一个问题.就是死说找不到MagickWand.h:

checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h

可是我明明正确安装了ImageMagick的呀.GOOGLE了半天,也解决不了这个问题.后面对照另一个服务器上的ImageMagick才发现,原来ImageMagick 6.8这个版后的目录结构变了,旧版本头文件是放在/usr/local/include/ImageMagick目录的,

而ImageMagick 6.8则是放在/usr/local/include/ImageMagick-6

添加软连接

命令如下:

复制代码 代码如下:


ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick
make && make && install

编译通过!

在php中,imagick与MagickWand库需要GD库的支持? 今天发现用readImage读取png格式的文件发生错误

图形图像都需要gd库支持,
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn