ImageMagick : ERROR: Failed to build gem native extension
ImageMagick : ERROR: Failed to build gem native extension
我在安装名为 rmagick 的 gem 时遇到错误。我在其他 Stack Over flow 网站上看到过关于同一问题的信息。但没有工作。
错误:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0/ext/RMagick
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170403-8836-1ebgkj8.rb extconf.rb
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/rmagick-2.16.0/gem_make.out
C:\Users\suresh>gem install rmagick
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0/ext/RMagick
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170403-7540-1x6tan0.rb extconf.rb
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/rmagick-2.16.0/gem_make.out
我实际上做了什么,第3步和第4步输出了上面相同的错误。
1.Downloaded ImageMagick-7.0.5-4-Q16-x64-dll
2.Set my Path to C:\Program Files (x86)\ImageMagick-7.0.5-Q16\include
set
3.Install the gem using this command:
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-7.0.5-Q16\lib --with-opt-include=C:\ImageMagick-7.0.5-Q16\include
4. or gem install rmagick
5. Using Windows 10 machine
RMagick
似乎还不支持 ImageMagick 7。尝试使用最新版本的 ImageMagick 6.9 安装 rmagick。
好的,我成功安装了它。
请遵循本指南。
第 1 步:下载并安装这个
ImageMagick-6.9.8-3-Q16-HDRI-x64-dl
第 2 步:设置并创建一个名为 CLASSPATH 的新环境变量,并将其值设置为
.;C:\ImageMagick-6.9.8-Q16-HDRI\include;lib C:\ImageMagick-6.9.8-Q16-HDRI\lib
第 3 步:gem 安装它
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.9.8-Q16-HDRI\lib --with-opt-include=C:\ImageMagick-6.9.8-Q16-HDRI\include
重要注意事项!!!
当您下载并安装 ImageMagick 时,确保在设置路径和 gem 安装时准确键入版本号。
像ImageMagic-6.9.8-3-Q16-HDRI这样的例子,完全按照。
我在安装名为 rmagick 的 gem 时遇到错误。我在其他 Stack Over flow 网站上看到过关于同一问题的信息。但没有工作。
错误:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0/ext/RMagick
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170403-8836-1ebgkj8.rb extconf.rb
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/rmagick-2.16.0/gem_make.out
C:\Users\suresh>gem install rmagick
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0/ext/RMagick
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170403-7540-1x6tan0.rb extconf.rb
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/rmagick-2.16.0/gem_make.out
我实际上做了什么,第3步和第4步输出了上面相同的错误。
1.Downloaded ImageMagick-7.0.5-4-Q16-x64-dll
2.Set my Path to C:\Program Files (x86)\ImageMagick-7.0.5-Q16\include
set
3.Install the gem using this command:
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-7.0.5-Q16\lib --with-opt-include=C:\ImageMagick-7.0.5-Q16\include
4. or gem install rmagick
5. Using Windows 10 machine
RMagick
似乎还不支持 ImageMagick 7。尝试使用最新版本的 ImageMagick 6.9 安装 rmagick。
好的,我成功安装了它。
请遵循本指南。
第 1 步:下载并安装这个
ImageMagick-6.9.8-3-Q16-HDRI-x64-dl
第 2 步:设置并创建一个名为 CLASSPATH 的新环境变量,并将其值设置为
.;C:\ImageMagick-6.9.8-Q16-HDRI\include;lib C:\ImageMagick-6.9.8-Q16-HDRI\lib
第 3 步:gem 安装它
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.9.8-Q16-HDRI\lib --with-opt-include=C:\ImageMagick-6.9.8-Q16-HDRI\include
重要注意事项!!!
当您下载并安装 ImageMagick 时,确保在设置路径和 gem 安装时准确键入版本号。
像ImageMagic-6.9.8-3-Q16-HDRI这样的例子,完全按照。