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

发布于 2024-11-29 06:50:57 字数 1176 浏览 8 评论 0原文

下载 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.xml文件


找到链接“http://pecl.php.net/package/gmagick”来下载php扩展,将其解压以找到以下文件--gmagick

-1.0.9b1$ ls

config.m4 gmagickdraw_methods.c gmagick_methods.c 许可证 php_gmagick_helpers.h 自述文件 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,'

已经这样做了一天,没有任何结果。读到 gmagick 是图像处理的瑞士刀,遗憾的是没有太多关于它的文档,或者至少没有正确的如何在任何地方安装链接。

急需帮助。

提前致谢。

Downloaded php-pear and tried installing gmagick extension by following the steps given in link "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu"

The pecl gave an error --

gmagick-1.0.9b1$ pecl install gmagick

Failed to download pecl/gmagick within preferred state "stable", latest release is version 1.0.9b1, stability "beta", use "channel://pecl.php.net/gmagick-1.0.9b1" to install
install failed


Tried adding the channel (no result)--

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

Error: No version number found in tag
channel-add: invalid channel.xml file


Found the link "http://pecl.php.net/package/gmagick" to download the php extension untar'd it to find the following files --

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

Tried . / config.m4 only to find more errors

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,'

Been at this since a day with no result.Read that gmagick is a swiss knife of image processing,sad that there isnt much documentation done on it or at least a proper how to install link anywhere.

Badly need help.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一花一树开 2024-12-06 06:50:57

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

sudo apt-get install libgraphicsmagick1-dev

然后安装 GMagick for PHP:

sudo pecl install gmagick-1.1.1RC1

最后在 PHP 中加载扩展:

sudo sh -c 'echo "extension=gmagick.so" >> /etc/php5/apache2/php.ini'
sudo service apache2 restart

The following works for me on Kubuntu 11.04. First install the development files:

sudo apt-get install libgraphicsmagick1-dev

Then install GMagick for PHP:

sudo pecl install gmagick-1.1.1RC1

Finally load the extension in PHP:

sudo sh -c 'echo "extension=gmagick.so" >> /etc/php5/apache2/php.ini'
sudo service apache2 restart
情定在深秋 2024-12-06 06:50:57

找到答案>>

外壳> cd gmagick-1.0.9b1

shell> phpize

shell> ./

配置外壳>制作

外壳> make install

然后,

创建文件 /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”和教程“的组合帮助了我。

Found the answer >>

shell> cd gmagick-1.0.9b1

shell> phpize

shell> ./configure

shell> make

shell> make install

Then,

Create file /etc/php/conf.d/imagick.ini and add a line "extension=imagick.so"

Reload Apache: sudo /etc/init.d/apache2 reload

For some reason,pecl never worked.but a combination of the links "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu" and the tutorial " helped me.

终弃我 2024-12-06 06:50:57
apt-get install php-pear
pecl install gmagick-1.1.7RC3
apt-get install libevent-dev
apt-get install libgraphicsmagick1-dev

nano /etc/php5/mods-available/gmagick.ini // Add "extension=gmagick.so"
cd /etc/php5/cli/conf.d/    
ln -s ../../mods-available/gmagick.ini 20-gmagick.ini

php5enmod gmagick
service nginx restart
service php5-fpm restart 
apt-get install php-pear
pecl install gmagick-1.1.7RC3
apt-get install libevent-dev
apt-get install libgraphicsmagick1-dev

nano /etc/php5/mods-available/gmagick.ini // Add "extension=gmagick.so"
cd /etc/php5/cli/conf.d/    
ln -s ../../mods-available/gmagick.ini 20-gmagick.ini

php5enmod gmagick
service nginx restart
service php5-fpm restart 
巷子口的你 2024-12-06 06:50:57

我从来不喜欢“PECL”,但似乎是将 gmagick 添加到我的 [电子邮件受保护] 是 Mac 狂热者。

运行 pecl install gmagick 后,控制台中的输出将类似于:

无法在首选状态“稳定”下下载 pecl/gmagick,最新版本是版本 2.0.5RC1,稳定性“测试版”,使用“ Channel://pecl.php.net/gmagick-2.0.5RC1”安装

页面的内容和页面URL指向“Release 2.0.5RC1”,因此命令变为:

pecl install gmagick-2.0.5RC1

这个“PECL”东西将扩展安装到 PHP 扫描的特定目录中

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "/usr/local/lib/php/pecl/20180731"

I never liked "PECL", but seems is the only way to get that gmagick added to my [email protected] being Mac zealoth.

After running pecl install gmagick the output in the console will be similar to:

Failed to download pecl/gmagick within preferred state "stable", latest release is version 2.0.5RC1, stability "beta", use "channel://pecl.php.net/gmagick-2.0.5RC1" to install

The content of the page and the page URL points to "Release 2.0.5RC1", so the command becomes:

pecl install gmagick-2.0.5RC1

That "PECL" thing installs extensions to a pecific directory, which PHP scans

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "/usr/local/lib/php/pecl/20180731"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文