Gmagick php extension - how and where?

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

Spots gave an error -

gmagick-1.0.9b1 $ pecl install gmagick

Failed to load pecl / gmagick in privileged state "stable", latest version is version 1.0.9b1, stability is beta, use "channel: //pecl.php.net/gmagick-1.0.9b1" to install Installation error


I tried to add a channel (without result) -

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

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


Found the link "http://pecl.php.net/package/gmagick" to download the php extension 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 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 on it since the day without result. Read that gmagick is a Swiss image-processing knife, sad that it does not have documentation, or at least the correct way to set links anywhere.

No need help.

Thanks in advance.

+7
source share
4 answers

Found answer →

shell> cd gmagick-1.0.9b1

shell> phpize

shell> ./configure

shell> make

shell> make install

Then

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

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

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

+1
source

The following works for me on Kubuntu 11.04. Install the development files first:

 sudo apt-get install libgraphicsmagick1-dev 

Then install GMagick for PHP:

 sudo pecl install gmagick-1.1.1RC1 

Finally, download the extension in PHP:

 sudo sh -c 'echo "extension=gmagick.so" >> /etc/php5/apache2/php.ini' sudo service apache2 restart 
+12
source
 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 
+1
source

I never liked PECL, but it seems to be the only way to add this gmagick to my php@7.3 being Mac zealoth.

After running pecl install gmagick output in the console will look like:

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

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

pecl install gmagick-2.0.5RC1

This "PECL" thing installs extensions in a special directory that scans PHP

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

All Articles