用于php安装的Gmagick扩展 - 如何以及在哪里?

Viv*_*dra 7 php imagemagick image-processing php-extension graphicsmagick

下载php-pear并按照链接"http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu"中给出的步骤尝试安装gmagick扩展

pecl给出了一个错误 -

gmagick-1.0.9b1 $ pecl install gmagick

无法在首选状态"稳定"下载pecl/gmagick,最新版本是版本1.0.9b1,稳定性"beta",使用"channel://pecl.php.net/gmagick-1.0.9b1"安装安装失败


尝试添加频道(无结果) -

gmagick-1.0.9b1 $ pecl channel-add http://pecl.php.net/package/gmagick/1.0.9b1

错误:标记channel-add中找不到版本号:无效的channel.xml文件


找到链接"http://pecl.php.net/package/gmagick"下载php扩展名解压缩它找到以下文件 -

gmagick-1.0.9b1 $ ls

config.m4 gmagickdraw_methods.c gmagick_methods.c LICENSE php_gmagick_helpers.h README gmagick.c gmagick_helpers.c gmagickpixel_methods.c php_gmagick.h php_gmagick_macros.h

试过/config.m4只能找到更多错误

gmagick-1.0.9b1 $./ config.m4

./config.m4: line 1: syntax error near unexpected token `gmagick,'
./config.m4: line 1: `PHP_ARG_WITH(gmagick, whether to enable the gmagick extension,'
Run Code Online (Sandbox Code Playgroud)

自从没有结果的一天以来就一直在这里.回想起gmagick是图像处理的瑞士刀,很遗憾没有做太多的文档或者至少在任何地方安装链接.

急需帮助.

提前致谢.

liv*_*cmg 12

以下适用于Kubuntu 11.04.首先安装开发文件:

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

然后安装GMagick for PHP:

sudo pecl install gmagick-1.1.1RC1
Run Code Online (Sandbox Code Playgroud)

最后在PHP中加载扩展:

sudo sh -c 'echo "extension=gmagick.so" >> /etc/php5/apache2/php.ini'
sudo service apache2 restart
Run Code Online (Sandbox Code Playgroud)


Viv*_*dra 1

找到答案>>

外壳> cd gmagick-1.0.9b1

外壳> phpize

外壳> ./配置

外壳>制作

外壳> 进行安装

然后,

创建文件 /etc/php/conf.d/imagick.ini 并添加一行“extension=imagick.so”

重新加载 Apache: sudo /etc/init.d/apache2 reload

由于某种原因,pecl 从来没有工作过。但是链接“http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu”和教程“的组合帮助了我。