php安裝imagick擴充

來源:互聯網
上載者:User

標籤:imagick

參考連結:http://my.oschina.net/u/142836/blog/169382


需要下載的東西:

libwebp-0.5.1.tar.gzwget  ImageMagick6.9.5.tar.gzwget http://git.imagemagick.org/repos/ImageMagick/repository/archive.tar.gz?ref=6.9.5-0imagick-3.1.2.tgzhttps://pecl.php.net/get/imagick-3.1.2.tgz

一定要用ImageMagick6.9.5.tar.gz這個包,因為官方最新版的是ImageMagick-7.0.2-4,安裝後有問題.


一.

yum -y install libpng-devel libjpeg-devel

二.安裝webo庫

[[email protected] src]# tar -zxvf libwebp-0.5.0.tar.gz[[email protected] src]# cd libwebp-0.5.0/[[email protected] libwebp-0.5.0]# ./configure && make && make install[[email protected] libwebp-0.5.0]# cp /usr/local/lib/libwebp.so.6.0.0 /usr/lib64/[[email protected] libwebp-0.5.0]# ln -s  /usr/lib64/libwebp.so.6.0.0 /usr/lib64/libwebp.so.6[[email protected] libwebp-0.5.0]# ln -s  /usr/lib64/libwebp.so.6.0.0 /usr/lib64/libwebp.so

安裝ImageMagick

[[email protected] src]# tar -zxvf ImageMagick6.9.5.tar.gz[[email protected] src]# cd ImageMagick-6.9.5/[[email protected] ImageMagick-6.9.5]# ./configure --prefix=/usr/local/imagemagick --with-webp[[email protected] ImageMagick-6.9.5]# make && make install[[email protected] src]# ln -s /usr/local/imagemagick/include/ImageMagick-6 /usr/local/imagemagick/include/ImageMagick

不同的地方:

[[email protected] src]# vim /etc/profileexport MAGICK_HOME=/usr/local/imagemagick/export PATH=$MAGICK_HOME/bin:$PATH[[email protected] src]# source /etc/profile

沒有上面那一步,可能會找不到convert命令。

安裝php擴充

tar -zxvf imagick-3.1.0RC2.tgzcd imagick-3.1.0RC2/usr/local/php/bin/phpizeexport PKG_CONFIG_PATH=/usr/local/imagemagick/lib/pkgconfig./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagickmake && make install

有兩個坑,就是用官方的最新版本ImageMagick,不正常.

另外一個是,要source 環境

可以參考:http://www.imagemagick.org/script/binary-releases.php/


php安裝imagick擴充

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.