Home >Backend Development >PHP Tutorial >为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法_php实例

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

WBOY
WBOYOriginal
2016-05-16 20:33:221051browse

今天在新服上安装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

编译通过!

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