在 Ubuntu 上安装 imagick PHP 扩展

在 Ubuntu 上安装 imagick PHP 扩展

我正在尝试在我的 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

我剪掉了大部分输出,因为它看起来没什么帮助,但如果有需要我可以发布。

  • PHP 版本为 5.2.4
  • ImageMagick 版本为 6.3.7
  • 今天sudo aptitude upgrade在安装 ImageMagick 之前也升级了 RPM

答案1

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

sudo apt-get install libmagickwand-dev libmagickcore-dev

答案2

它在 ubuntu 存储库中(hardy 的版本为 2.0.1-1),你尝试自己编译它有什么理由吗?

相关内容