search

PHP imagick

Jun 06, 2016 pm 08:02 PM
imagickphpInstall

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

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=/usr/local/ImageMagick/lib/pkgconfig/

确认ImageMagick 的安装目录是这个目录

3.重新安装PHP扩展:imagick

1

2

3

4

5

6

7

8

wget -c http://pecl.php.net/get/imagick-3.1.0RC2.tgz

tar zxvf imagick-3.1.0RC2.tgz

cd imagick-3.1.0RC2/

make clean

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/ImageMagick

make && make install

ldconfig -v /usr/local/


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

vi /usr/local/php/etc/php.ini

#搜索 extension_dir, PHP 5.3.x中 extension_dir 的默认值一般设置成
#/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
添加一行记录

1

2

3

extension = "imagick.so"

#按键盘 ESC 键 退出编辑状态

:wq #保存退出

重启PHP, lnmpa 环境下,重启 Apache 即可

1

service httpd -k restart

附 ImageMagick,imagick 下载地址

ImageMagick http://www.imagemagick.org/script/download.php
imagick-3.1.0RC2 最新版下载 http://pecl.php.net/package/imagick

IMAGEMAGICK 安装教程:

1

2

3

4

5

6

7

wget -c ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/ImageMagick-6.7.7-7.tar.gz

tar zxvf ImageMagick-6.7.7-7.tar.gz

cd ImageMagick-6.7.7-7/

./configure --prefix=/usr/local/ImageMagick/

make

make install

cd ../

测试是否安装成功

1

/usr/local/ImageMagick/bin/convert logo: logo.gif

如果没有提示任何错误,然后检查执行命令时所在的目录 看看是否生成了 logo.gif 这个文件

1

ll logo.gif

查看ImageMagick 版本及配置参数

1

/usr/local/ImageMagick/bin/identify -list configure

附录,linux下查看磁盘的剩余空间

1

df -lh

本文部分内容参考 http://www.g78.net/?p=288 在此感谢

参考文案:http://www.gemingcao.com/archives/linux-imagemagick-imagick.html

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use