我在安装rmagick时遇到这个错误,我遵循了所有的指南,每次都得到相同的错误。这一次,我遵循了这个指南:http://www.youtube.com/watch?v=gEWAVlNCKhg&feature=youtu.be:
C:/Ruby192/bin/ruby.exe extconf.rb --with-opt-include=C:/ImageMagick/Sou
rceCode --with-opt-lib=C:/ImageMagick
checking for Ruby version >= 1.8.5... yes
*** 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=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby192/bin/ruby
extconf.rb:171:in ``': No such file or directory - convert -version (Errno::ENOE
NT)
from extconf.rb:171:in `<main>'
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2
.13.1 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick
/gem_make.out
c:\>发布于 2012-04-25 05:09:40
根据错误:
extconf.rb:171:in ``': No such file or directory - convert -version
(Errno::ENOENT)看起来你没有安装Imagemagick (或类似的软件)。Imagemagick套件中的主要应用程序是convert二进制文件。如果你确定你已经安装了它,那么你应该检查它是否可以在PATH中访问。
发布于 2012-04-25 16:57:19
首先,我认为应该在系统中设置环境变量。
但是在命令视图中设置这些变量:
set DFImageMagick = C:\ImageMagick
set PATH=%DFImageMagick%;%PATH% (if you don't already have it in PATH)
set CPATH=%DFImageMagick%\include;%CPATH%
set LIBRARY_PATH=%DFImageMagick%\lib;%LIBRARY_PATH%然后运行命令gem install rmagick
并且gem安装成功,没有任何错误!
https://stackoverflow.com/questions/10305781
复制相似问题