rmagick安装

时间:2012-03-05 03:45:35

标签: installation imagemagick rmagick gruff

我在安装Rmagick时遇到了一些问题。 有两种方法可以安装它: 1]使用Ruby-Gem 2]来源

我在这两方面都遇到了问题,但我希望能够获得宝石并安装。

我已经更新了PKG_CONFIG_PATH,但我仍然面临问题:

 PKG_CONFIG_PATH=/home/<user>/Downloads/ImageMagick-6.7.5-7/magick gem install rmagick  

    Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

        /home/<user>/apps/jruby-1.6.4/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
checking for Ruby version >= 1.8.5... yes
checking for cc... yes
checking for Magick-config... yes

Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
         /usr/local/bin/Magick-config reports version 6.7.5 Q8 is installed in /usr/local
         /usr/bin/Magick-config reports version 6.5.7 Q16 is installed in /usr
Using 6.7.5 Q8 from /usr/local.

checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... no
checking for sys/types.h... no
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/<user>/apps/jruby-1.6.4/bin/jruby

ImageMagick配置如下。请验证此配置     符合你的期望。

Host system type: x86_64-unknown-linux-gnu
Build system type: x86_64-unknown-linux-gnu

                  Option                        Value
-------------------------------------------------------------------------------
Shared libraries  --enable-shared=yes           yes
Static libraries  --enable-static=yes           yes
Module support    --with-modules=no             no
GNU ld            --with-gnu-ld=yes             yes
Quantum depth     --with-quantum-depth=16       16
High Dynamic Range Imagery
                  --enable-hdri=no              no

Delegate Configuration:
BZLIB             --with-bzlib=yes              no
Autotrace         --with-autotrace=no           no
Dejavu fonts      --with-dejavu-font-dir=default        none
DJVU              --with-djvu=yes               no
DPS               --with-dps=yes                no
FFTW              --with-fftw=yes               no
FlashPIX          --with-fpx=yes                no
FontConfig        --with-fontconfig=yes         no
FreeType          --with-freetype=yes           yes
GhostPCL          None                          pcl6 (unknown)
GhostXPS          None                          gxps (unknown)
Ghostscript       None                          gs (8.71)
Ghostscript fonts --with-gs-font-dir=default    /usr/share/fonts/type1/gsfonts/
Ghostscript lib   --with-gslib=no               no
Graphviz          --with-gvc=yes                no
JBIG              --with-jbig=yes               no
JPEG v1           --with-jpeg=yes               yes
JPEG-2000         --with-jp2=yes                no
LCMS v1           --with-lcms=yes               yes
LCMS v2           --with-lcms2=yes              no
LQR               --with-lqr=yes                no
LZMA              --with-lzma=yes               no
Magick++          --with-magick-plus-plus=yes   yes
OpenEXR           --with-openexr=yes            no
PERL              --with-perl=no                no
PANGO             --with-pango=yes              no
PNG               --with-png=yes                no
RSVG              --with-rsvg=yes               no
TIFF              --with-tiff=yes               no
WEBP              --with-webp=yes               no
Windows fonts     --with-windows-font-dir=      none
WMF               --with-wmf=no         no
X11               --with-x=                     no
XML               --with-xml=yes                no
ZLIB              --with-zlib=yes               yes

X11 Configuration:
      X_CFLAGS        =
      X_PRE_LIBS      =
      X_LIBS          =
      X_EXTRA_LIBS    =

Options used to compile and link:
  PREFIX          = /usr/local
  EXEC-PREFIX     = /usr/local
  VERSION         = 6.7.5
  CC              = gcc -std=gnu99 -std=gnu99
  CFLAGS          = -fopenmp -g -O2 -Wall -pthread
  CPPFLAGS        = -I/usr/local/include/ImageMagick
  PCFLAGS         = -fopenmp
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -L/usr/lib
  MAGICK_LDFLAGS  = -L/usr/local/lib -L/usr/lib
  LIBS            = -lMagickCore -llcms -lfreetype -ljpeg -lz -lm -lgomp -lpthread
  CXX             = g++
  CXXFLAGS        = -g -O2 -pthread
  FEATURES        = OpenMP

有什么建议吗?

更新: 我安装了libmagickwand-dev和libmagickwand2

P.S:我正在尝试使用Gruff,我想知道是否使用它也会像安装一样痛苦。我可能也会尝试rcharts而这个问题得到解决......

2 个答案:

答案 0 :(得分:0)

您将PKG_CONFIG_PATH设置为文件,而不是路径。以下应该工作:

PKG_CONFIG_PATH=/home/<user>/Downloads/ImageMagick-6.7.5-7/magick gem install rmagick

(虽然知道安装RMagick有多痛苦,但它仍然可能不起作用,如果没有,请随时发表评论。)

答案 1 :(得分:0)

好吧,根据错误消息,您可能缺少libmagickwand-dev包。

如果您只是使用ubuntu:

sudo apt-get install libmagickwand-dev