正在检查ImageMagick版本>;=6.4.9... 没有Can';t安装RMagick 2.13.4。您必须具有ImageMagick 6.4.9或更高版本

正在检查ImageMagick版本>;=6.4.9... 没有Can';t安装RMagick 2.13.4。您必须具有ImageMagick 6.4.9或更高版本,imagemagick,rmagick,Imagemagick,Rmagick,我安装rmagick有困难。我正在使用RubyonRails框架开发我的项目。我把rmagick宝石包括在我的gem文件中。我收到以下错误消息: checking for ImageMagick version >= 6.4.9... no Can't install RMagick 2.13.4. You must have ImageMagick 6.4.9 or later. 我已使用brew安装imagemagick: imagemagick-6.8.9-8 already i

我安装rmagick有困难。我正在使用RubyonRails框架开发我的项目。我把rmagick宝石包括在我的gem文件中。我收到以下错误消息:

checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.4. You must have ImageMagick 6.4.9 or later.
我已使用brew安装imagemagick:

 imagemagick-6.8.9-8 already installed
imagemagick文件夹位于/usr/local/ceral目录中

在我的终端:

Zoulfias iMac:Myapp zoulfiahall$rvm使用ruby-2.0.0-p481

Using /Users/zoulfiahall/.rvm/gems/ruby-2.0.0-p481
Zoulfias-iMac:Myapp zoulfiahall$ sudo gem install rmagick

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

/Users/zoulfiahall/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.4. You must have ImageMagick 6.4.9 or later.

*** 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=/Users/zoulfiahall/.rvm/rubies/ruby-2.0.0-p481/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/zoulfiahall/.rvm/rubies/
ruby-2.0.0-  p481/lib/ruby/gems/2.0.0/gems/rmagick-2.13.4 for inspection.
Results logged to /Users/zoulfiahall/.rvm/rubies/
ruby-2.0.0-  p481/lib/ruby/gems/2.0.0/extensions/x86_64-darwin-13/
2.0.0-static/rmagick-2.13.4/gem_make.out

如有任何建议,将不胜感激

我在

我正在使用debian sid运行crunchbang linux


看起来你在OSX上。如果你还没有,请考虑提交你自己的bug报告。

< P>只是有同样的问题。请尝试卸载imagemagick,然后重新安装:

brew uninstall --force imagemagick
brew install imagemagick

然后安装rmagick。这对我有效。

这对我在ubuntu上有效

$ sudo apt-get install imagemagick
$ sudo apt-get install libmagickwand-dev
现在再试一次

$ bundle install

我今天也有同样的问题。 导致问题的原因是
rmagick
已过时。 而且gem没有定期更新。 我想为那些不介意使用旧版本imagemagick的人介绍我的解决方案。(我相信是6.5.9-10)

  • 卸载imagemagick及其所有组件:

    brew卸载--强制imagemagick

  • 通过在命令末尾添加-ruby186来安装旧版本的imagemagick

    brew安装imagemagick-ruby186

  • 安装rmagick:)

    gem安装rmagick

  • 享受吧

  • 下载并安装


    这对我来说很有效。

    我在尝试运行
    gem安装rmagick-v2.13.4

    其中的诀窍是rmagick安装程序(gems/rmagick-2.13.4/ext/rmagick/extconf.rb)检查
    convert
    的输出以确定IM版本。如果没有返回正确的版本(或者完全损坏,就像我的情况一样),rmagick将不会安装

    我通过自制软件安装了ImageMagick 6,解决了我的问题。此代码段安装IM,将其添加到您的路径,并运行指向IM6的安装程序

    $ brew install imagemagick@6
    $ echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.bash_profile
    $ source ~/.bash_profile
    $ PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick -v 2.13.4
    

    祝你好运

    如果您使用brew安装imagemagickimagemagick@6

    安装捆绑包之前,请运行:

    export LDFLAGS="-L/usr/local/opt/imagemagick@6/lib"
    export CPPFLAGS="-I/usr/local/opt/imagemagick@6/include"
    export PKG_CONFIG_PATH="/usr/local/opt/imagemagick@6/lib/pkgconfig"
    

    这为我解决了MacOS 10.14 Mojave中的问题

    brew install pkg-config
    PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick@6/6.9.11-0/lib/pkgconfig gem install rmagick -v 2.16.0
    

    这是这里最简单、最直接的解决方案,对我来说效果很好。我建议其他人先试试这个,然后再试试其他的。谢谢你发布这个。它可以工作,但我还需要使用命令
    #apt install ruby-rmagick
    安装ruby-rmagick。如果可能,请尝试说明为什么我们需要安装这些库才能正确使用ImageMagick。在其他情况下也是如此。@memberwhyyoustarted我不知道为什么需要它。该库似乎依赖于开发库,而不仅仅是生产二进制文件。我不知道为什么,只是它起作用了。
    export LDFLAGS="-L/usr/local/opt/imagemagick@6/lib"
    export CPPFLAGS="-I/usr/local/opt/imagemagick@6/include"
    export PKG_CONFIG_PATH="/usr/local/opt/imagemagick@6/lib/pkgconfig"
    
    brew install pkg-config
    PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick@6/6.9.11-0/lib/pkgconfig gem install rmagick -v 2.16.0