php 安装imagick图形处理库


一种快速成功的办法
yum install ImageMagick

yum install ImageMagick-devel

yum install php-pear [for PECL]

/opt/lampp/bin/pecl install imagick

Build process completed successfully
Installing ‘/opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/imagick.so’
Installing ‘/opt/lampp/include/php/ext/imagick/php_imagick_shared.h’
install ok: channel://pecl.php.net/imagick-3.4.3
configuration option “php_ini” is not set to php.ini location
You should add “extension=imagick.so” to php.ini

好了

Windows系统

mac 系统
export MAGICK_HOME=”$HOME/ImageMagick-7.0.7″
export PATH=”$MAGICK_HOME/bin:$PATH”
export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib/”

export MAGICK_HOME=”$/ImageMagick-7.0.7″
export PATH=”$MAGICK_HOME/bin:$PATH”
export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib/”

安装

http://www.imagemagick.org/script/download.php#macosx

magick logo: logo.gif
identify logo.gif
display logo.gif

php插件

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

tar -xzvf imagick-3.1.0RC1

tar.xz解压缩办法
$ xz -d node-v6.10.1-linux-x64.tar.xz
$ tar -xvf node-v6.10.1-linux-x64.tar

phpize
/Applications/XAMPP/bin/phpize

./configure –with-php-config=/usr/local/php/bin/php-config –with-imagick=/usr/local/imagemagick
make
make install

./configure –with-php-config=/Applications/XAMPP/bin/php-config –with-imagick=/usr/local/imagemagick

./configure –with-php-config=/Applications/XAMPP/bin/php-config –with-imagick=/Users/ge/ImageMagick-7.0.7

tar xvf 压缩文件名

/Applications/XAMPP/bin/phpize

./configure
各种报错
checking ImageMagick MagickWand API configuration program… checking Testing /usr/local/bin/MagickWand-config… Doesn’t exist
checking Testing /usr/bin/MagickWand-config… Doesn’t exist
checking Testing /usr/sbin/bin/MagickWand-config… Doesn’t exist
checking Testing /opt/bin/MagickWand-config… Doesn’t exist
checking Testing /opt/local/bin/MagickWand-config… Doesn’t exist
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

./configure –with-imagick=/Users/ge/ImageMagick-7.0.7/ –with-php-config=/Applications/XAMPP/bin/php-config

降低ImageMagick版本
wget ftp://mirror.aarnet.edu.au/pub/imagemagick/ImageMagick-6.6.8-10.tar.gz
无法下载

这里可以

http://www.imagemagick.org/download/releases/

tar -xzvf ImageMagick-6.6.8-10.tar.gz
./configure –prefix=/usr/local/imagemagick
make
make install

##################################
2018-3-17 -2
下载http://www.imagemagick.org/download/releases/

http://www.imagemagick.org/download/releases/ImageMagick-6.5.4-10.tar.xz

xz -d ImageMagick-6.5.4-10.tar.xz
tar -xvf ImageMagick-6.5.4-10.tar

cd /Users/ge/imagek/ImageMagick-6.5.4-10

./configure –prefix=/usr/local/imagemagick
make
make install
低版本的ImageMagick 无法安装成功
我的Mac系统 macOS High Sierra v10.13

试试port安装
sudo port install ImageMagick

https://www.macports.org/install.php

phpize
/Applications/XAMPP/bin/phpize

./configure –with-php-config=/usr/local/php/bin/php-config –with-imagick=/usr/local/imagemagick
make
make install

MAC 系统失败2018-3-17

centos系统

cd /backup/soft
wget http://pecl.php.net/get/imagick-3.4.3.tgz
tar -xzvf imagick-3.4.3.tgz
pwd
/backup/soft/imagick-3.4.3

/opt/lampp/bin/phpize
./configure –with-php-config=/opt/lampp/bin/php-config –with-imagick=/usr/local/imagemagick

configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
要先安装imagemagick 我没有继续,linux系统请回顶部看快速安装办法。

如果你是一名技术人员可加我QQ 2651-0442-02,如果你是java技术人还可以加入QQ群 1784-9136-0
你将得到的不仅仅是技术的交流,还有职业机会,人生解惑.
首发地址:月小升博客https://java-er.com/blog/php-imagick/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
此条目发表在 PHP 分类目录,贴了 , , 标签。将固定链接加入收藏夹。
既然来了,就评论一下,不会怀孕的

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">