在 Ubuntu Server 14.04 下安装 ImageMagick 的 PHP5 imagick-3.4.3RC1 扩展
ImageMagick 是一个免费开源、用于编辑、创建、合成图像的工具。ImageMagick 可读取、转换、写入多种格式图像。包括:图像切割、颜色替换、各种效果的应用,图像旋转、组合、文本、直线、多边形、椭圆、曲线、附加到图像伸展旋转、等等。
ImageMagick 遵守 GPL 许可协议,是一个免费工具:完全开放源码,可自由使用、复制、修改、发布;它可运行于大多数操作系统。ImageMagick 几乎可在任何非专有操作系统上编译,无论是 32 位还是 64 位 CPU,包括:Linux、Windows 95/98/ME/NT 4.0/2000/XP、Windows 2003、Windows 7、Windows 8、Macintosh (MacOS 9 /10)、VMS 和 OS/2。ImageMagick 的大多数功能的用法都是使用命令行。
ImageMagick 是一套功能强大、稳定且开源的工具集、开发包。可用来读、写和处理超过 200 多种格式的图片文件,包括流行的 TIF、JPG、JPEG、GIF、 PNG、PDF 以及 PhotoCD 等格式。
ImageMagick 可根据 Web 应用程序的需要动态生成图片, 可对一个(或一组)图片进行缩放、旋转、锐化、减色或增加特效等操作,并将操作结果以相同格式或其它格式保存;对图片的操作,即可通过命令行进行,也可通过 C/C++、Perl、Java、PHP、Python 或 Ruby 编程完成。同时 ImageMagick 还提供了一个高质量的 2D 工具包,部分支持 SVG。ImageMagick 的主要精力集中在性能,减少 Bug 以及提供稳定的 API 和 ABI 上。
01、安装 pecl 扩展库
- root:~# apt-get install php-pear
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following extra packages will be installed:
- php5-cli php5-readline
- The following NEW packages will be installed:
- php-pear php5-cli php5-readline
- 0 upgraded, 3 newly installed, 0 to remove and 151 not upgraded.
- Need to get 0 B/2,441 kB of archives.
- After this operation, 11.5 MB of additional disk space will be used.
- Do you want to continue? [Y/n] y
- Selecting previously unselected package php5-cli.
- (Reading database ... 123974 files and directories currently installed.)
- Preparing to unpack .../php5-cli_5.5.9+dfsg-1ubuntu4.17_amd64.deb ...
- Unpacking php5-cli (5.5.9+dfsg-1ubuntu4.17) ...
- Selecting previously unselected package php5-readline.
- Preparing to unpack .../php5-readline_5.5.9+dfsg-1ubuntu4.17_amd64.deb ...
- Unpacking php5-readline (5.5.9+dfsg-1ubuntu4.17) ...
- Selecting previously unselected package php-pear.
- Preparing to unpack .../php-pear_5.5.9+dfsg-1ubuntu4.17_all.deb ...
- Unpacking php-pear (5.5.9+dfsg-1ubuntu4.17) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- Processing triggers for php5-fpm (5.5.9+dfsg-1ubuntu4.17) ...
- php5-fpm stop/waiting
- php5-fpm start/running, process 21983
- Setting up php5-cli (5.5.9+dfsg-1ubuntu4.17) ...
- update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode
- php5_invoke: Enable module mysql for cli SAPI
- php5_invoke: Enable module snmp for cli SAPI
- php5_invoke: Enable module xmlrpc for cli SAPI
- php5_invoke: Enable module ming for cli SAPI
- php5_invoke: Enable module curl for cli SAPI
- php5_invoke: Enable module apcu for cli SAPI
- php5_invoke: Enable module recode for cli SAPI
- php5_invoke: Enable module intl for cli SAPI
- php5_invoke: Enable module json for cli SAPI
- php5_invoke: Enable module sqlite3 for cli SAPI
- php5_invoke: Enable module imagick for cli SAPI
- php5_invoke: Enable module pdo_sqlite for cli SAPI
- php5_invoke: Enable module mysqli for cli SAPI
- php5_invoke: Enable module xsl for cli SAPI
- php5_invoke: Enable module opcache for cli SAPI
- php5_invoke: Enable module pdo_mysql for cli SAPI
- php5_invoke: Enable module gd for cli SAPI
- php5_invoke: Enable module pspell for cli SAPI
- php5_invoke: Enable module pdo for cli SAPI
- php5_invoke: Enable module tidy for cli SAPI
- Setting up php5-readline (5.5.9+dfsg-1ubuntu4.17) ...
- php5_invoke: Enable module readline for fpm SAPI
- php5_invoke: Enable module readline for cli SAPI
- php5_invoke: Enable module readline for cgi SAPI
- Setting up php-pear (5.5.9+dfsg-1ubuntu4.17) ...
- Processing triggers for php5-fpm (5.5.9+dfsg-1ubuntu4.17) ...
- php5-fpm stop/waiting
- php5-fpm start/running, process 23027
- root:~#
复制代码 02、安装开发支持模块
- root:~# apt-get install php5-dev
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following extra packages will be installed:
- pkg-php-tools
- Suggested packages:
- dh-make
- The following NEW packages will be installed:
- php5-dev pkg-php-tools
- 0 upgraded, 2 newly installed, 0 to remove and 151 not upgraded.
- Need to get 0 B/378 kB of archives.
- After this operation, 3,874 kB of additional disk space will be used.
- Do you want to continue? [Y/n] y
- Selecting previously unselected package php5-dev.
- (Reading database ... 123848 files and directories currently installed.)
- Preparing to unpack .../php5-dev_5.5.9+dfsg-1ubuntu4.17_amd64.deb ...
- Unpacking php5-dev (5.5.9+dfsg-1ubuntu4.17) ...
- Selecting previously unselected package pkg-php-tools.
- Preparing to unpack .../pkg-php-tools_1.11_all.deb ...
- Unpacking pkg-php-tools (1.11) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- Setting up php5-dev (5.5.9+dfsg-1ubuntu4.17) ...
- update-alternatives: using /usr/bin/php-config5 to provide /usr/bin/php-config (php-config) in auto mode
- update-alternatives: using /usr/bin/phpize5 to provide /usr/bin/phpize (phpize) in auto mode
- Setting up pkg-php-tools (1.11) ...
- root:~#
复制代码 03、安装 ImageMagick 接口04、安装 ImageMagick 开发包
- root:~# apt-get install libmagickwand-dev libmagickcore-dev
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following packages were automatically installed and are no longer required:
- libgraphics-magick-perl libgraphicsmagick++1-dev libgraphicsmagick++3
- libgraphicsmagick1-dev libgraphicsmagick3
- Use 'apt-get autoremove' to remove them.
- The following extra packages will be installed:
- gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-rsvg-2.0 libcairo-gobject2
- libcairo-script-interpreter2 libcairo2-dev libdjvulibre-dev libelfg0
- libexpat1 libexpat1-dev libfontconfig1-dev libgdk-pixbuf2.0-dev
- libglib2.0-bin libglib2.0-dev libgraphviz-dev libilmbase-dev liblqr-1-0-dev
- liblzo2-2 libmagickcore5 libmagickcore5-extra libmagickwand5 libopenexr-dev
- libpcre3 libpcre3-dev libpcrecpp0 libpixman-1-0 libpixman-1-dev librsvg2-dev
- libxcb-render0-dev libxcb-shm0-dev libxdot4 libxrender-dev libxt-dev
- pkg-config x11proto-render-dev
- Suggested packages:
- libcairo2-doc libglib2.0-doc librsvg2-doc libxt-doc
- The following packages will be REMOVED:
- graphicsmagick-libmagick-dev-compat
- The following NEW packages will be installed:
- gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-rsvg-2.0 libcairo-gobject2
- libcairo-script-interpreter2 libcairo2-dev libdjvulibre-dev libelfg0
- libexpat1-dev libfontconfig1-dev libgdk-pixbuf2.0-dev libglib2.0-bin
- libglib2.0-dev libgraphviz-dev libilmbase-dev liblqr-1-0-dev liblzo2-2
- libmagickcore-dev libmagickwand-dev libopenexr-dev libpcre3-dev libpcrecpp0
- libpixman-1-dev librsvg2-dev libxcb-render0-dev libxcb-shm0-dev libxdot4
- libxrender-dev libxt-dev pkg-config x11proto-render-dev
- The following packages will be upgraded:
- libexpat1 libmagickcore5 libmagickcore5-extra libmagickwand5 libpcre3
- libpixman-1-0
- 6 upgraded, 31 newly installed, 1 to remove and 171 not upgraded.
- Need to get 10.4 MB of archives.
- After this operation, 41.2 MB of additional disk space will be used.
- Do you want to continue? [Y/n] y
- Get:1 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libpcre3 amd64 1:8.31-2ubuntu2.3 [144 kB]
- Get:2 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libexpat1 amd64 2.1.0-4ubuntu1.3 [71.1 kB]
- Get:3 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libcairo-gobject2 amd64 1.13.0~20140204-0ubuntu1.1 [17.2 kB]
- Get:4 http://mirrors.aliyun.com/ubuntu/ trusty-security/main liblzo2-2 amd64 2.06-1.2ubuntu1.1 [46.1 kB]
- Get:5 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libcairo-script-interpreter2 amd64 1.13.0~20140204-0ubuntu1.1 [53.2 kB]
- Get:6 http://mirrors.aliyun.com/ubuntu/ trusty/main libelfg0 amd64 0.8.13-5 [37.6 kB]
- Get:7 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libmagickwand5 amd64 8:6.7.7.10-6ubuntu3.1 [267 kB]
- Get:8 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libmagickcore5-extra amd64 8:6.7.7.10-6ubuntu3.1 [57.8 kB]
- Get:9 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libmagickcore5 amd64 8:6.7.7.10-6ubuntu3.1 [1,474 kB]
- Get:10 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libpcrecpp0 amd64 1:8.31-2ubuntu2.3 [14.5 kB]
- Get:11 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libpixman-1-0 amd64 0.30.2-2ubuntu1.1 [225 kB]
- Get:12 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main gir1.2-freedesktop amd64 1.40.0-1ubuntu0.2 [5,652 B]
- Get:13 http://mirrors.aliyun.com/ubuntu/ trusty-security/main gir1.2-gdkpixbuf-2.0 amd64 2.30.7-0ubuntu1.2 [7,964 B]
- Get:14 http://mirrors.aliyun.com/ubuntu/ trusty/main gir1.2-rsvg-2.0 amd64 2.40.2-1 [3,550 B]
- Get:15 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
- Get:16 http://mirrors.aliyun.com/ubuntu/ trusty/main pkg-config amd64 0.26-1ubuntu4 [40.9 kB]
- Get:17 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libfontconfig1-dev amd64 2.11.0-0ubuntu4.1 [664 kB]
- Get:18 http://mirrors.aliyun.com/ubuntu/ trusty/main x11proto-render-dev all 2:0.11.1-2 [20.1 kB]
- Get:19 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libxrender-dev amd64 1:0.9.8-1build0.14.04.1 [23.8 kB]
- Get:20 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libpixman-1-dev amd64 0.30.2-2ubuntu1.1 [240 kB]
- Get:21 http://mirrors.aliyun.com/ubuntu/ trusty/main libxcb-render0-dev amd64 1.10-2ubuntu1 [16.7 kB]
- Get:22 http://mirrors.aliyun.com/ubuntu/ trusty/main libxcb-shm0-dev amd64 1.10-2ubuntu1 [6,868 B]
- Get:23 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libglib2.0-bin amd64 2.40.2-0ubuntu1 [34.9 kB]
- Get:24 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libpcre3-dev amd64 1:8.31-2ubuntu2.3 [237 kB]
- Get:25 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libglib2.0-dev amd64 2.40.2-0ubuntu1 [1,322 kB]
- Get:26 http://mirrors.aliyun.com/ubuntu/ trusty-updates/main libcairo2-dev amd64 1.13.0~20140204-0ubuntu1.1 [574 kB]
- Get:27 http://mirrors.aliyun.com/ubuntu/ trusty/main libdjvulibre-dev amd64 3.5.25.4-3 [2,363 kB]
- Get:28 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libgdk-pixbuf2.0-dev amd64 2.30.7-0ubuntu1.2 [43.0 kB]
- Get:29 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libxdot4 amd64 2.36.0-0ubuntu3.1 [19.4 kB]
- Get:30 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libgraphviz-dev amd64 2.36.0-0ubuntu3.1 [60.9 kB]
- Get:31 http://mirrors.aliyun.com/ubuntu/ trusty/main libilmbase-dev amd64 1.0.1-6ubuntu1 [112 kB]
- Get:32 http://mirrors.aliyun.com/ubuntu/ trusty/main liblqr-1-0-dev amd64 0.4.1-2ubuntu1 [134 kB]
- Get:33 http://mirrors.aliyun.com/ubuntu/ trusty/main libopenexr-dev amd64 1.6.1-7ubuntu1 [233 kB]
- Get:34 http://mirrors.aliyun.com/ubuntu/ trusty/main librsvg2-dev amd64 2.40.2-1 [97.6 kB]
- Get:35 http://mirrors.aliyun.com/ubuntu/ trusty/main libxt-dev amd64 1:1.1.4-1 [455 kB]
- Get:36 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libmagickcore-dev amd64 8:6.7.7.10-6ubuntu3.1 [906 kB]
- Get:37 http://mirrors.aliyun.com/ubuntu/ trusty-security/main libmagickwand-dev amd64 8:6.7.7.10-6ubuntu3.1 [272 kB]
- Fetched 10.4 MB in 7s (1,393 kB/s)
- Extracting templates from packages: 100%
- (Reading database ... 126353 files and directories currently installed.)
- Removing graphicsmagick-libmagick-dev-compat (1.3.18-1ubuntu3) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- (Reading database ... 126332 files and directories currently installed.)
- Preparing to unpack .../libpcre3_1%3a8.31-2ubuntu2.3_amd64.deb ...
- Unpacking libpcre3:amd64 (1:8.31-2ubuntu2.3) over (1:8.31-2ubuntu2.1) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- Setting up libpcre3:amd64 (1:8.31-2ubuntu2.3) ...
- Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
- (Reading database ... 126332 files and directories currently installed.)
- Preparing to unpack .../libexpat1_2.1.0-4ubuntu1.3_amd64.deb ...
- Unpacking libexpat1:amd64 (2.1.0-4ubuntu1.3) over (2.1.0-4ubuntu1.1) ...
- Selecting previously unselected package libcairo-gobject2:amd64.
- Preparing to unpack .../libcairo-gobject2_1.13.0~20140204-0ubuntu1.1_amd64.deb ...
- Unpacking libcairo-gobject2:amd64 (1.13.0~20140204-0ubuntu1.1) ...
- Selecting previously unselected package liblzo2-2:amd64.
- Preparing to unpack .../liblzo2-2_2.06-1.2ubuntu1.1_amd64.deb ...
- Unpacking liblzo2-2:amd64 (2.06-1.2ubuntu1.1) ...
- Selecting previously unselected package libcairo-script-interpreter2:amd64.
- Preparing to unpack .../libcairo-script-interpreter2_1.13.0~20140204-0ubuntu1.1_amd64.deb ...
- Unpacking libcairo-script-interpreter2:amd64 (1.13.0~20140204-0ubuntu1.1) ...
- Selecting previously unselected package libelfg0:amd64.
- Preparing to unpack .../libelfg0_0.8.13-5_amd64.deb ...
- Unpacking libelfg0:amd64 (0.8.13-5) ...
- Preparing to unpack .../libmagickwand5_8%3a6.7.7.10-6ubuntu3.1_amd64.deb ...
- Unpacking libmagickwand5:amd64 (8:6.7.7.10-6ubuntu3.1) over (8:6.7.7.10-6ubuntu3) ...
- Preparing to unpack .../libmagickcore5-extra_8%3a6.7.7.10-6ubuntu3.1_amd64.deb ...
- Unpacking libmagickcore5-extra:amd64 (8:6.7.7.10-6ubuntu3.1) over (8:6.7.7.10-6ubuntu3) ...
- Preparing to unpack .../libmagickcore5_8%3a6.7.7.10-6ubuntu3.1_amd64.deb ...
- Unpacking libmagickcore5:amd64 (8:6.7.7.10-6ubuntu3.1) over (8:6.7.7.10-6ubuntu3) ...
- Selecting previously unselected package libpcrecpp0:amd64.
- Preparing to unpack .../libpcrecpp0_1%3a8.31-2ubuntu2.3_amd64.deb ...
- Unpacking libpcrecpp0:amd64 (1:8.31-2ubuntu2.3) ...
- Preparing to unpack .../libpixman-1-0_0.30.2-2ubuntu1.1_amd64.deb ...
- Unpacking libpixman-1-0:amd64 (0.30.2-2ubuntu1.1) over (0.30.2-2ubuntu1) ...
- Selecting previously unselected package gir1.2-freedesktop.
- Preparing to unpack .../gir1.2-freedesktop_1.40.0-1ubuntu0.2_amd64.deb ...
- Unpacking gir1.2-freedesktop (1.40.0-1ubuntu0.2) ...
- Selecting previously unselected package gir1.2-gdkpixbuf-2.0.
- Preparing to unpack .../gir1.2-gdkpixbuf-2.0_2.30.7-0ubuntu1.2_amd64.deb ...
- Unpacking gir1.2-gdkpixbuf-2.0 (2.30.7-0ubuntu1.2) ...
- Selecting previously unselected package gir1.2-rsvg-2.0.
- Preparing to unpack .../gir1.2-rsvg-2.0_2.40.2-1_amd64.deb ...
- Unpacking gir1.2-rsvg-2.0 (2.40.2-1) ...
- Selecting previously unselected package libexpat1-dev:amd64.
- Preparing to unpack .../libexpat1-dev_2.1.0-4ubuntu1.3_amd64.deb ...
- Unpacking libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
- Selecting previously unselected package pkg-config.
- Preparing to unpack .../pkg-config_0.26-1ubuntu4_amd64.deb ...
- Unpacking pkg-config (0.26-1ubuntu4) ...
- Selecting previously unselected package libfontconfig1-dev.
- Preparing to unpack .../libfontconfig1-dev_2.11.0-0ubuntu4.1_amd64.deb ...
- Unpacking libfontconfig1-dev (2.11.0-0ubuntu4.1) ...
- Selecting previously unselected package x11proto-render-dev.
- Preparing to unpack .../x11proto-render-dev_2%3a0.11.1-2_all.deb ...
- Unpacking x11proto-render-dev (2:0.11.1-2) ...
- Selecting previously unselected package libxrender-dev:amd64.
- Preparing to unpack .../libxrender-dev_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
- Unpacking libxrender-dev:amd64 (1:0.9.8-1build0.14.04.1) ...
- Selecting previously unselected package libpixman-1-dev.
- Preparing to unpack .../libpixman-1-dev_0.30.2-2ubuntu1.1_amd64.deb ...
- Unpacking libpixman-1-dev (0.30.2-2ubuntu1.1) ...
- Selecting previously unselected package libxcb-render0-dev:amd64.
- Preparing to unpack .../libxcb-render0-dev_1.10-2ubuntu1_amd64.deb ...
- Unpacking libxcb-render0-dev:amd64 (1.10-2ubuntu1) ...
- Selecting previously unselected package libxcb-shm0-dev:amd64.
- Preparing to unpack .../libxcb-shm0-dev_1.10-2ubuntu1_amd64.deb ...
- Unpacking libxcb-shm0-dev:amd64 (1.10-2ubuntu1) ...
- Selecting previously unselected package libglib2.0-bin.
- Preparing to unpack .../libglib2.0-bin_2.40.2-0ubuntu1_amd64.deb ...
- Unpacking libglib2.0-bin (2.40.2-0ubuntu1) ...
- Selecting previously unselected package libpcre3-dev:amd64.
- Preparing to unpack .../libpcre3-dev_1%3a8.31-2ubuntu2.3_amd64.deb ...
- Unpacking libpcre3-dev:amd64 (1:8.31-2ubuntu2.3) ...
- Selecting previously unselected package libglib2.0-dev.
- Preparing to unpack .../libglib2.0-dev_2.40.2-0ubuntu1_amd64.deb ...
- Unpacking libglib2.0-dev (2.40.2-0ubuntu1) ...
- Selecting previously unselected package libcairo2-dev.
- Preparing to unpack .../libcairo2-dev_1.13.0~20140204-0ubuntu1.1_amd64.deb ...
- Unpacking libcairo2-dev (1.13.0~20140204-0ubuntu1.1) ...
- Selecting previously unselected package libdjvulibre-dev:amd64.
- Preparing to unpack .../libdjvulibre-dev_3.5.25.4-3_amd64.deb ...
- Unpacking libdjvulibre-dev:amd64 (3.5.25.4-3) ...
- Selecting previously unselected package libgdk-pixbuf2.0-dev.
- Preparing to unpack .../libgdk-pixbuf2.0-dev_2.30.7-0ubuntu1.2_amd64.deb ...
- Unpacking libgdk-pixbuf2.0-dev (2.30.7-0ubuntu1.2) ...
- Selecting previously unselected package libxdot4.
- Preparing to unpack .../libxdot4_2.36.0-0ubuntu3.1_amd64.deb ...
- Unpacking libxdot4 (2.36.0-0ubuntu3.1) ...
- Selecting previously unselected package libgraphviz-dev.
- Preparing to unpack .../libgraphviz-dev_2.36.0-0ubuntu3.1_amd64.deb ...
- Unpacking libgraphviz-dev (2.36.0-0ubuntu3.1) ...
- Selecting previously unselected package libilmbase-dev.
- Preparing to unpack .../libilmbase-dev_1.0.1-6ubuntu1_amd64.deb ...
- Unpacking libilmbase-dev (1.0.1-6ubuntu1) ...
- Selecting previously unselected package liblqr-1-0-dev.
- Preparing to unpack .../liblqr-1-0-dev_0.4.1-2ubuntu1_amd64.deb ...
- Unpacking liblqr-1-0-dev (0.4.1-2ubuntu1) ...
- Selecting previously unselected package libopenexr-dev.
- Preparing to unpack .../libopenexr-dev_1.6.1-7ubuntu1_amd64.deb ...
- Unpacking libopenexr-dev (1.6.1-7ubuntu1) ...
- Selecting previously unselected package librsvg2-dev.
- Preparing to unpack .../librsvg2-dev_2.40.2-1_amd64.deb ...
- Unpacking librsvg2-dev (2.40.2-1) ...
- Selecting previously unselected package libxt-dev:amd64.
- Preparing to unpack .../libxt-dev_1%3a1.1.4-1_amd64.deb ...
- Unpacking libxt-dev:amd64 (1:1.1.4-1) ...
- Selecting previously unselected package libmagickcore-dev.
- Preparing to unpack .../libmagickcore-dev_8%3a6.7.7.10-6ubuntu3.1_amd64.deb ...
- Unpacking libmagickcore-dev (8:6.7.7.10-6ubuntu3.1) ...
- Selecting previously unselected package libmagickwand-dev.
- Preparing to unpack .../libmagickwand-dev_8%3a6.7.7.10-6ubuntu3.1_amd64.deb ...
- Unpacking libmagickwand-dev (8:6.7.7.10-6ubuntu3.1) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- Processing triggers for libglib2.0-0:amd64 (2.40.2-0ubuntu1) ...
- No schema files found: doing nothing.
- Setting up libexpat1:amd64 (2.1.0-4ubuntu1.3) ...
- Setting up libcairo-gobject2:amd64 (1.13.0~20140204-0ubuntu1.1) ...
- Setting up liblzo2-2:amd64 (2.06-1.2ubuntu1.1) ...
- Setting up libcairo-script-interpreter2:amd64 (1.13.0~20140204-0ubuntu1.1) ...
- Setting up libelfg0:amd64 (0.8.13-5) ...
- Setting up libmagickcore5:amd64 (8:6.7.7.10-6ubuntu3.1) ...
- Setting up libmagickwand5:amd64 (8:6.7.7.10-6ubuntu3.1) ...
- Setting up libmagickcore5-extra:amd64 (8:6.7.7.10-6ubuntu3.1) ...
- Setting up libpcrecpp0:amd64 (1:8.31-2ubuntu2.3) ...
- Setting up libpixman-1-0:amd64 (0.30.2-2ubuntu1.1) ...
- Setting up gir1.2-freedesktop (1.40.0-1ubuntu0.2) ...
- Setting up gir1.2-gdkpixbuf-2.0 (2.30.7-0ubuntu1.2) ...
- Setting up gir1.2-rsvg-2.0 (2.40.2-1) ...
- Setting up libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
- Setting up pkg-config (0.26-1ubuntu4) ...
- Setting up libfontconfig1-dev (2.11.0-0ubuntu4.1) ...
- Setting up x11proto-render-dev (2:0.11.1-2) ...
- Setting up libxrender-dev:amd64 (1:0.9.8-1build0.14.04.1) ...
- Setting up libpixman-1-dev (0.30.2-2ubuntu1.1) ...
- Setting up libxcb-render0-dev:amd64 (1.10-2ubuntu1) ...
- Setting up libxcb-shm0-dev:amd64 (1.10-2ubuntu1) ...
- Setting up libglib2.0-bin (2.40.2-0ubuntu1) ...
- Setting up libpcre3-dev:amd64 (1:8.31-2ubuntu2.3) ...
- Setting up libglib2.0-dev (2.40.2-0ubuntu1) ...
- Setting up libcairo2-dev (1.13.0~20140204-0ubuntu1.1) ...
- Setting up libdjvulibre-dev:amd64 (3.5.25.4-3) ...
- Setting up libgdk-pixbuf2.0-dev (2.30.7-0ubuntu1.2) ...
- Setting up libxdot4 (2.36.0-0ubuntu3.1) ...
- Setting up libgraphviz-dev (2.36.0-0ubuntu3.1) ...
- Setting up libilmbase-dev (1.0.1-6ubuntu1) ...
- Setting up liblqr-1-0-dev (0.4.1-2ubuntu1) ...
- Setting up libopenexr-dev (1.6.1-7ubuntu1) ...
- Setting up librsvg2-dev (2.40.2-1) ...
- Setting up libxt-dev:amd64 (1:1.1.4-1) ...
- Setting up libmagickcore-dev (8:6.7.7.10-6ubuntu3.1) ...
- Setting up libmagickwand-dev (8:6.7.7.10-6ubuntu3.1) ...
- Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
- root:~#
复制代码 05、安装 imagemagick php5 接口
遇到 Please provide the prefix of Imagemagick installation [autodetect] : 直接回车
- root:~# pecl install imagick
- downloading imagick-3.4.3RC1.tgz ...
- Starting to download imagick-3.4.3RC1.tgz (245,140 bytes)
- ......................done: 245,140 bytes
- 19 source files, building
- running: phpize
- Configuring for:
- PHP Api Version: 20121113
- Zend Module Api No: 20121212
- Zend Extension Api No: 220121212
- Please provide the prefix of Imagemagick installation [autodetect] :
- building in /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1
- running: /tmp/pear/temp/imagick/configure --with-imagick
- checking for grep that handles long lines and -e... /bin/grep
- checking for egrep... /bin/grep -E
- checking for a sed that does not truncate output... /bin/sed
- checking for cc... cc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- checking for suffix of executables...
- checking whether we are cross compiling... no
- checking for suffix of object files... o
- checking whether we are using the GNU C compiler... yes
- checking whether cc accepts -g... yes
- checking for cc option to accept ISO C89... none needed
- checking how to run the C preprocessor... cc -E
- checking for icc... no
- checking for suncc... no
- checking whether cc understands -c and -o together... yes
- checking for system library directory... lib
- checking if compiler supports -R... no
- checking if compiler supports -Wl,-rpath,... yes
- checking build system type... x86_64-unknown-linux-gnu
- checking host system type... x86_64-unknown-linux-gnu
- checking target system type... x86_64-unknown-linux-gnu
- checking for PHP prefix... /usr
- checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
- checking for PHP extension directory... /usr/lib/php5/20121212
- checking for PHP installed headers prefix... /usr/include/php5
- checking if debug is enabled... no
- checking if zts is enabled... no
- checking for re2c... no
- configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
- checking for gawk... no
- checking for nawk... nawk
- checking if nawk is broken... no
- checking whether to enable the imagick extension... yes, shared
- checking for pkg-config... /usr/bin/pkg-config
- checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
- checking Testing /usr/bin/MagickWand-config... It exists
- found in /usr/bin/MagickWand-config
- checking if ImageMagick version is at least 6.2.4... found version 6.7.7 Q16
- checking for MagickWand.h or magick-wand.h header... /usr/include/ImageMagick/wand/MagickWand.h
- checking PHP version is at least 5.1.3... yes. found 5.5.9-1ubuntu4.17
- libs
- -lMagickWand -lMagickCore
- checking for MagickGetVersion... no
- checking for __MagickGetVersion... no
- checking for MagickSetImageInterpolateMethod... no
- checking for __MagickSetImageInterpolateMethod... no
- checking how to print strings... printf
- checking for a sed that does not truncate output... (cached) /bin/sed
- checking for fgrep... /bin/grep -F
- checking for ld used by cc... /usr/bin/ld
- checking if the linker (/usr/bin/ld) is GNU ld... yes
- checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
- checking the name lister (/usr/bin/nm -B) interface... BSD nm
- checking whether ln -s works... yes
- checking the maximum length of command line arguments... 1572864
- checking whether the shell understands some XSI constructs... yes
- checking whether the shell understands "+="... yes
- checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
- checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
- checking for /usr/bin/ld option to reload object files... -r
- checking for objdump... objdump
- checking how to recognize dependent libraries... pass_all
- checking for dlltool... no
- checking how to associate runtime and link libraries... printf %s\n
- checking for ar... ar
- checking for archiver @FILE support... @
- checking for strip... strip
- checking for ranlib... ranlib
- checking for gawk... (cached) nawk
- checking command to parse /usr/bin/nm -B output from cc object... ok
- checking for sysroot... no
- checking for mt... mt
- checking if mt is a manifest tool... no
- checking for ANSI C header files... yes
- checking for sys/types.h... yes
- checking for sys/stat.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for memory.h... yes
- checking for strings.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for unistd.h... yes
- checking for dlfcn.h... yes
- checking for objdir... .libs
- checking if cc supports -fno-rtti -fno-exceptions... no
- checking for cc option to produce PIC... -fPIC -DPIC
- checking if cc PIC flag -fPIC -DPIC works... yes
- checking if cc static flag -static works... yes
- checking if cc supports -c -o file.o... yes
- checking if cc supports -c -o file.o... (cached) yes
- checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
- checking whether -lc should be explicitly linked in... no
- checking dynamic linker characteristics... GNU/Linux ld.so
- checking how to hardcode library paths into programs... immediate
- checking whether stripping libraries is possible... yes
- checking if libtool supports shared libraries... yes
- checking whether to build shared libraries... yes
- checking whether to build static libraries... no
- configure: creating ./config.status
- config.status: creating config.h
- config.status: executing libtool commands
- running: make
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_file.c -o imagick_file.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_file.c -fPIC -DPIC -o .libs/imagick_file.o
- /tmp/pear/temp/imagick/imagick_file.c: In function 'php_imagick_is_url':
- /tmp/pear/temp/imagick/imagick_file.c:85:2: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type [enabled by default]
- if (php_stream_locate_url_wrapper(filename, &path_for_open, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC)) {
- ^
- In file included from /usr/include/php5/main/php.h:396:0,
- from /tmp/pear/temp/imagick/php_imagick.h:40,
- from /tmp/pear/temp/imagick/imagick_file.c:21:
- /usr/include/php5/main/php_streams.h:548:28: note: expected 'char **' but argument is of type 'const char **'
- PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char **path_for_open, int options TSRMLS_DC);
- ^
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_class.c -o imagick_class.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_class.c -fPIC -DPIC -o .libs/imagick_class.o
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimagematte':
- /tmp/pear/temp/imagick/imagick_class.c:299:2: warning: 'MagickGetImageMatte' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:82) [-Wdeprecated-declarations]
- matte = MagickGetImageMatte(intern->magick_wand);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_paintfloodfillimage':
- /tmp/pear/temp/imagick/imagick_class.c:1248:3: warning: 'MagickPaintFloodfillImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:99) [-Wdeprecated-declarations]
- status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, NULL, x, y);
- ^
- /tmp/pear/temp/imagick/imagick_class.c:1256:3: warning: 'MagickPaintFloodfillImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:99) [-Wdeprecated-declarations]
- status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, border_wand, x, y);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_recolorimage':
- /tmp/pear/temp/imagick/imagick_class.c:1738:2: warning: 'MagickRecolorImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:109) [-Wdeprecated-declarations]
- status = MagickRecolorImage(intern->magick_wand, order, array);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_colorfloodfillimage':
- /tmp/pear/temp/imagick/imagick_class.c:4279:2: warning: 'MagickColorFloodfillImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:75) [-Wdeprecated-declarations]
- status = MagickColorFloodfillImage(intern->magick_wand, fill_wand, fuzz, border_wand, x, y);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_mapimage':
- /tmp/pear/temp/imagick/imagick_class.c:4707:2: warning: 'MagickMapImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:86) [-Wdeprecated-declarations]
- status = MagickMapImage(intern->magick_wand, intern_map->magick_wand, dither);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_mattefloodfillimage':
- /tmp/pear/temp/imagick/imagick_class.c:4748:2: warning: 'MagickMatteFloodfillImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:88) [-Wdeprecated-declarations]
- status = MagickMatteFloodfillImage(intern->magick_wand, alpha, fuzz, color_wand, x, y);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_medianfilterimage':
- /tmp/pear/temp/imagick/imagick_class.c:4786:2: warning: 'MagickMedianFilterImage' is deprecated (declared at /usr/include/ImageMagick/wand/magick-image.h:217) [-Wdeprecated-declarations]
- status = MagickMedianFilterImage(intern->magick_wand, radius);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_paintopaqueimage':
- /tmp/pear/temp/imagick/imagick_class.c:4868:2: warning: 'MagickPaintOpaqueImageChannel' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:104) [-Wdeprecated-declarations]
- status = MagickPaintOpaqueImageChannel(intern->magick_wand, channel, target_wand, fill_wand, fuzz);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_painttransparentimage':
- /tmp/pear/temp/imagick/imagick_class.c:4951:2: warning: 'MagickPaintTransparentImage' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:107) [-Wdeprecated-declarations]
- status = MagickPaintTransparentImage(intern->magick_wand, color_wand, alpha, fuzz);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_reducenoiseimage':
- /tmp/pear/temp/imagick/imagick_class.c:5115:2: warning: 'MagickReduceNoiseImage' is deprecated (declared at /usr/include/ImageMagick/wand/magick-image.h:265) [-Wdeprecated-declarations]
- status = MagickReduceNoiseImage(intern->magick_wand, radius);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimageattribute':
- /tmp/pear/temp/imagick/imagick_class.c:6444:2: warning: 'MagickGetImageAttribute' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:59) [-Wdeprecated-declarations]
- attribute = MagickGetImageAttribute(intern->magick_wand, key);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimagechannelextrema':
- /tmp/pear/temp/imagick/imagick_class.c:6661:2: warning: 'MagickGetImageChannelExtrema' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:78) [-Wdeprecated-declarations]
- status = MagickGetImageChannelExtrema(intern->magick_wand, channel_type, &minima, &maxima);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimageextrema':
- /tmp/pear/temp/imagick/imagick_class.c:7003:2: warning: 'MagickGetImageExtrema' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:80) [-Wdeprecated-declarations]
- status = MagickGetImageExtrema(intern->magick_wand, &min, &max);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimageindex':
- /tmp/pear/temp/imagick/imagick_class.c:8115:2: warning: 'MagickGetImageIndex' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:65) [-Wdeprecated-declarations]
- status = MagickGetImageIndex(intern->magick_wand);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_getimagesize':
- /tmp/pear/temp/imagick/imagick_class.c:8236:2: warning: 'MagickGetImageSize' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:140) [-Wdeprecated-declarations]
- ZVAL_LONG(return_value, (long)MagickGetImageSize(intern->magick_wand));
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_setimageattribute':
- /tmp/pear/temp/imagick/imagick_class.c:8710:2: warning: 'MagickSetImageAttribute' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:111) [-Wdeprecated-declarations]
- status = MagickSetImageAttribute(intern->magick_wand, key, attribute);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_flattenimages':
- /tmp/pear/temp/imagick/imagick_class.c:9085:2: warning: 'MagickFlattenImages' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:132) [-Wdeprecated-declarations]
- tmp_wand = MagickFlattenImages(intern->magick_wand);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_averageimages':
- /tmp/pear/temp/imagick/imagick_class.c:10272:2: warning: 'MagickAverageImages' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:131) [-Wdeprecated-declarations]
- tmp_wand = MagickAverageImages(intern->magick_wand);
- ^
- /tmp/pear/temp/imagick/imagick_class.c: In function 'zim_imagick_mosaicimages':
- /tmp/pear/temp/imagick/imagick_class.c:10775:2: warning: 'MagickMosaicImages' is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:135) [-Wdeprecated-declarations]
- tmp_wand = MagickMosaicImages(intern->magick_wand);
- ^
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickdraw_class.c -o imagickdraw_class.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickdraw_class.c -fPIC -DPIC -o .libs/imagickdraw_class.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickpixel_class.c -o imagickpixel_class.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickpixel_class.c -fPIC -DPIC -o .libs/imagickpixel_class.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickpixeliterator_class.c -o imagickpixeliterator_class.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickpixeliterator_class.c -fPIC -DPIC -o .libs/imagickpixeliterator_class.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_helpers.c -o imagick_helpers.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick_helpers.c -fPIC -DPIC -o .libs/imagick_helpers.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick.c -o imagick.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagick.c -fPIC -DPIC -o .libs/imagick.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickkernel_class.c -o imagickkernel_class.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/imagickkernel_class.c -fPIC -DPIC -o .libs/imagickkernel_class.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=compile cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/shim_im6_to_im7.c -o shim_im6_to_im7.lo
- libtool: compile: cc -fopenmp -I/usr/include/ImageMagick -I. -I/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/imagick/shim_im6_to_im7.c -fPIC -DPIC -o .libs/shim_im6_to_im7.o
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/include -I/tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/main -I/tmp/pear/temp/imagick -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -o imagick.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules imagick_file.lo imagick_class.lo imagickdraw_class.lo imagickpixel_class.lo imagickpixeliterator_class.lo imagick_helpers.lo imagick.lo imagickkernel_class.lo shim_im6_to_im7.lo -lMagickWand -lMagickCore
- libtool: link: cc -shared -fPIC -DPIC .libs/imagick_file.o .libs/imagick_class.o .libs/imagickdraw_class.o .libs/imagickpixel_class.o .libs/imagickpixeliterator_class.o .libs/imagick_helpers.o .libs/imagick.o .libs/imagickkernel_class.o .libs/shim_im6_to_im7.o /usr/lib/x86_64-linux-gnu/libMagickWand.so /usr/lib/x86_64-linux-gnu/libMagickCore.so -O2 -fopenmp -pthread -Wl,-soname -Wl,imagick.so -o .libs/imagick.so
- libtool: link: ( cd ".libs" && rm -f "imagick.la" && ln -s "../imagick.la" "imagick.la" )
- /bin/bash /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/libtool --mode=install cp ./imagick.la /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules
- libtool: install: cp ./.libs/imagick.so /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules/imagick.so
- libtool: install: cp ./.libs/imagick.lai /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules/imagick.la
- libtool: finish: PATH="/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules
- ----------------------------------------------------------------------
- Libraries have been installed in:
- /tmp/pear/temp/pear-build-rootkLzIHv/imagick-3.4.3RC1/modules
- If you ever happen to want to link against installed libraries
- in a given directory, LIBDIR, you must either use libtool, and
- specify the full pathname of the library, or use the `-LLIBDIR'
- flag during linking and do at least one of the following:
- - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
- during execution
- - add LIBDIR to the `LD_RUN_PATH' environment variable
- during linking
- - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- - have your system administrator add LIBDIR to `/etc/ld.so.conf'
- See any operating system documentation about shared libraries for
- more information, such as the ld(1) and ld.so(8) manual pages.
- ----------------------------------------------------------------------
- Build complete.
- Don't forget to run 'make test'.
- running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1" install
- Installing shared extensions: /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/lib/php5/20121212/
- Installing header files: /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include/php5/
- running: find "/tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1" | xargs ls -dils
- 1049274 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1
- 1049312 4 drwxr-xr-x 4 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr
- 1049316 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include
- 1049317 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include/php5
- 1049318 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include/php5/ext
- 1049319 4 drwxr-xr-x 2 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include/php5/ext/imagick
- 1049320 4 -rw-r--r-- 1 root root 1828 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/include/php5/ext/imagick/php_imagick_shared.h
- 1049313 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/lib
- 1049314 4 drwxr-xr-x 3 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/lib/php5
- 1049315 4 drwxr-xr-x 2 root root 4096 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/lib/php5/20121212
- 1049311 1252 -rwxr-xr-x 1 root root 1277954 Jul 8 23:49 /tmp/pear/temp/pear-build-rootkLzIHv/install-imagick-3.4.3RC1/usr/lib/php5/20121212/imagick.so
- Build process completed successfully
- Installing '/usr/lib/php5/20121212/imagick.so'
- Installing '/usr/include/php5/ext/imagick/php_imagick_shared.h'
- install ok: channel://pecl.php.net/imagick-3.4.3RC1
- configuration option "php_ini" is not set to php.ini location
- You should add "extension=imagick.so" to php.ini
- root:~#
复制代码 06、配置 php.ini 文件
- vi /etc/php5/fpm/php.ini
- 在; extension=msql.so 下添加 extension=imagick.so
- echo extension=imagick.so
复制代码 07、重启服务器
- service php5-fpm stop
- service php5-fpm start
- service nginx restart
- <span style=" font-family:'Consolas'; font-size:10pt;">php -m | grep imagick</span>
- shutdown -r +1
复制代码 08、测试
转到网站根目录,vi ./info.php,添加以下代码:
在浏览器中访问探针文件 (譬如:http://www.digitser.cn/info.php) --> 正常的话,会出现上图所示 imagick 相关信息
请关注 "德云社区" 及其微信公众号,了解相关资讯
版权声明:
本文为独家原创稿件,版权归 德云社区,未经许可不得转载;否则,将追究其法律责任。
|