在 Windows 上安装 RMagick [英] Installing RMagick on Windows

查看:47
本文介绍了在 Windows 上安装 RMagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经对此进行了研究,并且已经在我的一台计算机上研究了好几个小时.

I've done research on this and I've been at it on my one computer for hours and hours.

大约 3 周前,我在台式计算机上安装了 RMagick,它相当复杂.

I've installed RMagick on my Desktop computer about 3 weeks ago, and it was fairly complicated.

我不记得我采取的确切步骤,我真的很沮丧.

I don't remember the exact steps I took, and I'm really frustrated.

我已经将 ImageMagick 安装到我的机器上的 C:\ImageMagick 目录中

I've installed ImageMagick onto my machine in the directory C:\ImageMagick

我也为 Ruby 安装了开发工具包.

I've installed the Development kit too for Ruby.

我还将 rmagick-rmagick-v2-2-g564f157 放入 C 中正确的 gems 文件夹中:它在 C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems

I've also put the rmagick-rmagick-v2-2-g564f157 into the proper gems folder in my C: It's in C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems

我收到以下错误:

我会输入:gem install rmagick -- '--with-opt-dir="c:\ImageMagick"'

并得到以下错误:

Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir="c:\ImageMagick"'
This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160326-6132-157vnes.rb extconf.rb
'--with-opt-dir="c:\ImageMagick"
checking for main() in -lCORE_RL_magick_... no
searching PATH for the ImageMagick library...
checking for main() in -lCORE_RL_magick_... no
checking for main() in -lCORE_RL_magick_... no
checking for main() in -lCORE_RL_magick_... no
Can't install RMagick 2.15.4.
Can't find the ImageMagick library.
Retry with '--with-opt-dir' option.
Usage: gem install rmagick -- '--with-opt-dir="[path to ImageMagick]"'
e.g.
  gem install rmagick -- '--with-opt-dir="C:Program FilesImageMagick-6.9.1-
Q16"'
*** 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
        --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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
        --with-CORE_RL_magick_lib
        --without-CORE_RL_magick_lib
        --with-CORE_RL_magick_lib
        --without-CORE_RL_magick_lib
        --with-CORE_RL_magick_lib
        --without-CORE_RL_magick_lib
        --with-CORE_RL_magick_lib
        --without-CORE_RL_magick_lib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0
/gems/rmagick-2.15.4 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/rmagick-2.15.4/gem_make.out

此时我很沮丧.它在我的台式计算机上工作,但在这里不起作用.有什么建议吗?

I'm so frustrated at this point. It worked on my Desktop computer, but won't work here. Any suggestions?

推荐答案

这是一个链接,可以帮助您解决在安装 rmagick gem 时遇到的所有问题.

This is the one link which can help you with all the issues you will ever face while installing rmagick gem.

经过大量浏览后找到它,之后您可能不需要任何其他链接来访问.

Found it after a lot of browsing and after it you might not need any other link to visit.

链接:- https://medium.com/ruby-on-rails-web-application-development/install-rmagick-gem-on-windows-7-8-10-imagemagick-6-9-4-q16-hdri-5492c3fef202

希望它能节省您的时间和精力

I hope it will save your time and efforts

这篇关于在 Windows 上安装 RMagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆