【问题标题】:Please provide the prefix of GraphicsMagick installation [autodetect]请提供 GraphicsMagick 安装的前缀 [autodetect]
【发布时间】:2012-01-27 10:24:14
【问题描述】:

我正在尝试使用此 pecl 命令为 GraphicsMagick 安装 PHP API:

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

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

Please provide the prefix of GraphicsMagick installation [autodetect]

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

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 服务器,有谁知道如何安装这个程序?

【问题讨论】:

    标签: php linux imagemagick pear graphicsmagick


    【解决方案1】:

    尝试安装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 安装成功。干杯。
    • 记录一下,安装libgraphicsmagick1-dev包后,我不需要输入config命令的路径,直接回车自动检测就可以了。
    • Mac OS Mavericks 有什么解决办法吗?
    • 在 OS X 上运行 brew install GraphicsMagick 然后重新运行命令
    【解决方案2】:

    在 OS X 上只需运行

    brew install GraphicsMagick

    然后重新运行pecl安装命令

    【讨论】:

    • 在 Centos / REHL 上:yum install GraphicsMagick-devel
    猜你喜欢
    • 2021-09-25
    • 2011-08-25
    • 2018-12-23
    • 1970-01-01
    • 1970-01-01
    • 2019-05-16
    • 1970-01-01
    • 2019-01-13
    • 1970-01-01
    相关资源
    最近更新 更多