ImageMagick /找不到魔杖/ MagickWand.h / Ubuntu 15.04

时间:2015-10-13 16:28:21

标签: ruby ubuntu imagemagick rmagick

我试图安装RMagick 2.13.4几个小时,但是无法做到。

我发现一个帖子有同样的问题但是没有解决:Can't find wand/MagickWand.h

这是我的控制台日志:

Installing rmagick 2.13.4 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/gfioriello/.rvm/rubies/ruby-2.0.0-p247/bin/ruby -r ./siteconf20151013-8735-126suhh.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.4. 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/gfioriello/.rvm/rubies/ruby-2.0.0-p247/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /home/gfioriello/.rvm/gems/ruby-2.0.0-p247@self_service/gems/rmagick-2.13.4 for inspection.
Results logged to /home/gfioriello/.rvm/gems/ruby-2.0.0-p247@self_service/extensions/x86_64-linux/2.0.0/rmagick-2.13.4/gem_make.out
An error occurred while installing rmagick (2.13.4), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.4'` succeeds before bundling.

我有Ubuntu 15.04

我安装了所有需要的软件包(imagemagick libmagickwand-dev等,我已经尝试了其他问题中描述的所有软件包)

这是我的ImageMagick版本

gfioriello@dvt-005:~$ identify -version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2015-01-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

如果有人知道该怎么做,我们将不胜感激。

1 个答案:

答案 0 :(得分:-1)

  1. 首先检查rmagick版本支持哪个imagemagick并通过此链接根据它下载https://download.imagemagick.org/ImageMagick/download/releases/
  2. 第二次下载后解压缩并转到文件夹并打开终端并在终端中逐步键入命令a)./configure b) make c) sudo make install 和卸载相同版本 sudo make uninstall 按照此链接了解更多信息 https://imagemagick.org/script/install-source.php d) sudo ldconfig /usr/local/lib e) sudo apt-get install imagemagick libmagickwand-dev f) sudo apt-get install libmagickcore-dev g) sudo apt-get install graphicsmagick-libmagick-dev-compat
  3. 一切完成后,输入 convert --version 以检查版本和正确安装。 输出将类似于 Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org 版权所有:© 1999-2017 ImageMagick Studio LLC 许可证:http://www.imagemagick.org/script/license.php 特点:密码 DPC 模块 OpenMP 代表(内置):bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib.
  4. 如果没有任何效果,因为您安装了错误的 ImageMagick 版本,请转到第二点并逐步卸载它 a)./configure b) ma​​ke< /strong> c)sudo make uninstall。它与安装 Imagemagick 的过程相同,而您必须使用 sudo make uninstall。