请提供 GraphicsMagick 安装的前缀 [自动检测]

11

我正试图使用这个pecl命令安装GraphicsMagick的PHP API:

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

在安装过程中,我被问到了这个问题:

Please provide the prefix of GraphicsMagick installation [autodetect]

我不知道如何回答这个问题,如果我只是按下回车键进行自动检测,安装就会失败。

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

我正在使用Ubuntu服务器,请问如何安装这个程序?

2个回答

15

尝试安装libgraphicsmagick1-dev软件包(sudo apt-get install libgraphicsmagick1-dev)。这应该会在/usr/bin中提供GraphicsMagick-config。

在尝试找出特定文件需要哪个软件包时,运行apt-file search <filename>有所帮助。因此,在这种情况下,运行apt-file search GraphicsMagick-config,在Ubuntu Server 11.04上的输出如下:

% apt-file search GraphicsMagick-config    
libgraphicsmagick1-dev: /usr/bin/GraphicsMagick-config
libgraphicsmagick1-dev: /usr/share/man/man1/GraphicsMagick-config.1.gz

非常感谢,兄弟。在使用你提供的命令安装后,然后使用我之前发布的pecl命令,并在提示符上输入/usr/bin/GraphicsMagick-config,安装顺利进行。干杯! - TKpop
值得一提的是,在安装了libgraphicsmagick1-dev软件包之后,我不需要输入config命令的路径,只需按回车键进行自动检测即可完美运行。 - leftclickben
这个问题在Mac OS Mavericks上有解决方法吗? - jhnferraris
在 OS X 上运行 brew install GraphicsMagick 然后重新运行该命令。 - tpei

0

在 OS X 上只需运行

brew install GraphicsMagick

然后重新运行 pecl 安装命令


2
在Centos / REHL上:yum install GraphicsMagick-devel - code_monk

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接