11

I'm trying to install the PHP API for GraphicsMagick using this pecl command:

sudo pecl install channel://pecl.php.net/gmagick-1.0.10b1

during installation I am asked this question:

Please provide the prefix of GraphicsMagick installation [autodetect]

I have no idea how to answer this and if I just press enter for auto detection the install fails.

checking whether to enable the gmagick extension... yes, shared
checking GraphicsMagick configuration program... configure: error: not found. Please provide a path to GraphicsMagick-config program.
ERROR: `/tmp/pear/temp/gmagick/configure --with-gmagick' failed

I am using ubuntu server, does anyone know how I can install this program?

TKpop
  • 309
  • 1
  • 4
  • 8

2 Answers2

15

Try installing the libgraphicsmagick1-dev package (sudo apt-get install libgraphicsmagick1-dev). That should give you GraphicsMagick-config in /usr/bin.

When trying to figure out what package is needed for a particular file running apt-file search <filename> helps. So in this case apt-file search GraphicsMagick-config which on Ubuntu Server 11.04 gives:

% apt-file search GraphicsMagick-config    
libgraphicsmagick1-dev: /usr/bin/GraphicsMagick-config
libgraphicsmagick1-dev: /usr/share/man/man1/GraphicsMagick-config.1.gz
Rob Wouters
  • 15,797
  • 3
  • 42
  • 36
  • thanks so much dude, after installing using the command you gave and then using the pecl command I posted earlier and entering /usr/bin/GraphicsMagick-config on the prompt the install went fine. Cheers. – TKpop Dec 24 '11 at 22:08
  • For the record, after installing the libgraphicsmagick1-dev package, I didn't need to enter the path to the config command, just pressing enter for autodetect worked perfectly. – leftclickben Apr 14 '14 at 08:12
  • Any fix for this for Mac OS Mavericks? – jhnferraris Jun 02 '14 at 08:54
  • On OS X run brew install GraphicsMagick and then rerun the command – tpei Aug 28 '14 at 12:37
0

On OS X simply run

brew install GraphicsMagick

and then rerun the pecl installation command

tpei
  • 671
  • 9
  • 26