找不到 graphicsmagick...但已安装?

Can't find graphicsmagick... but it's installed?

我正在使用 mupx 部署流星构建。 Graphicsmagick 安装在系统上(以及 imagemagick),两者都在 ubuntu 14.04 上使用 apt-get。我的应用程序在尝试转换图像时失败。这是我得到的错误:

[wyno.io] FS.Transform.createWriteStream transform function failed, Error: 
[wyno.io] Exception in queued task: Error: cfs:graphicsmagick could not find "graphicsMagick" or "imageMagick"
[wyno.io]     at gm (packages/cfs_graphicsmagick/packages/cfs_graphicsmagick.js:14:1)
[wyno.io]     at Object.FS.Collection.stores.FS.Store.GridFS.transformWrite (both/collections.js:10:1)
[wyno.io]     at packages/cfs_storage-adapter/packages/cfs_storage-adapter.js:355:1
[wyno.io]     at addPassThrough (packages/cfs_storage-adapter/packages/cfs_storage-adapter.js:421:1)
[wyno.io]     at [object Object].FS.Transform.createWriteStream (packages/cfs_storage-adapter/packages/cfs_storage-adapter.js:352:1)
[wyno.io]     at Object.self.adapter.createWriteStream (packages/cfs_storage-adapter/packages/cfs_storage-adapter.js:171:1)
[wyno.io]     at saveCopy (packages/cfs_worker/packages/cfs_worker.js:180:1)
[wyno.io]     at Object.fsCollection.files.find.observe.added (packages/cfs_worker/packages/cfs_worker.js:42:1)
[wyno.io]     at [object Object].observeChangesCallbacks.added (packages/minimongo/observe.js:153:1)
[wyno.io]     at self.applyChange.added (packages/minimongo/observe.js:53:1)

看起来这个问题的解决方案是手动安装,而不是通过 apt-get。以下是这样做的步骤:

  1. 从他们的 ftp 服务器获取 tar gz 文件。确保获得最新的 .tar.gz 版本。

    $ wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.1.tar.gz

  2. $ tar -xvzf GraphicsMagick-1.3.1.tar.gz

  3. $ cd GraphicsMagick-1.3.1/
  4. $ ./configure
  5. $ make
  6. $ make install

如果你的服务器上没有c编译器,还有步骤3.5:sudo apt-get install build-essential