在 Ubuntu 上安装 imagick PHP 扩展

Ste*_*iec 26 ubuntu php5 pecl imagemagick

我正在尝试在我的 Ubuntu 服务器上安装 imagick pecl 扩展,但出现以下错误。我已经使用 aptitude 安装了 ImageMagick rpm,pecl 扩展名是 2.3.0 版。我在网上环顾四周,但找不到任何指向正确方向的东西。我还尝试寻找任何看起来像是错误提到的 Wand-config 或 MagickWand-config 程序但找不到的任何东西。

steven@server:/var/www$ sudo pecl install imagick
downloading imagick-2.3.0.tgz ...
Starting to download imagick-2.3.0.tgz (86,976 bytes)
.....................done: 86,976 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
Please provide the prefix of Imagemagick installation [autodetect] :
building in /var/tmp/pear-build-root/imagick-2.3.0
running: /tmp/pear/temp/imagick/configure --with-imagick
*** ... snip ... ***
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed
Run Code Online (Sandbox Code Playgroud)

我剪掉了大部分输出,因为它似乎并没有真正有帮助,但如果需要,我可以发布。

  • PHP 是 5.2.4
  • ImageMagick 是 6.3.7
  • sudo aptitude upgrade今天升级RPM,以及之前安装的ImageMagick

hda*_*iel 45

您需要安装 ImageMagick 开发包。在 Ubuntu 中尝试:

sudo apt-get install libmagickwand-dev libmagickcore-dev
Run Code Online (Sandbox Code Playgroud)