rmagick installation [closed]

心不动则不痛 提交于 2019-12-10 10:56:49

问题


I am facing some issues while installing Rmagick. There are 2 ways to install this: 1] using Ruby-Gem 2] bld the source

I am facing issues in both, but I will like to be able to get the gem and install.

I have updated the PKG_CONFIG_PATH as many have suggested but I still face issues:

 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 is configured as follows. Please verify that this configuration matches your expectations.

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

Any suggestions ?

Update: I have libmagickwand-dev and libmagickwand2 installed

P.S:I am trying to use Gruff and I am wondering if using it would also be as painful as the installation . I might also try rcharts while this gets resolved...


回答1:


You're setting PKG_CONFIG_PATH to a file, not a path. The following should work:

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

(Though knowing how painful getting RMagick to install can often be, it still might not work, feel free to comment if it doesn't.)




回答2:


well, according to the error message you might be missing libmagickwand-dev package.

if you're using ubuntu just:

sudo apt-get install libmagickwand-dev


来源:https://stackoverflow.com/questions/9561386/rmagick-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!