Windows 8 在适用于Ruby 2.0 x64的Windows 8 x64上安装rmagick gem

Windows 8 在适用于Ruby 2.0 x64的Windows 8 x64上安装rmagick gem,windows-8,imagemagick,rmagick,ruby-2.0,Windows 8,Imagemagick,Rmagick,Ruby 2.0,我正在尝试在Windows8、Ruby2.0上安装RmagickGem,所有这些都是64位的。 我用RubyInstaller安装了Ruby2.0,版本为2.0.0p247,在顶部安装了DevKit-mingw64-64-4.7.2-20130224。然后我安装了ImageMagic-ImageMagick-6.8.6-4-Q16-x64-dll版本,确切地说,当然还有开发人员标题。它们都直接位于各自子文件夹中的C:drive上,名称中没有空格。 然后我试着做一块宝石 gem install r

我正在尝试在Windows8、Ruby2.0上安装RmagickGem,所有这些都是64位的。 我用RubyInstaller安装了Ruby2.0,版本为2.0.0p247,在顶部安装了DevKit-mingw64-64-4.7.2-20130224。然后我安装了ImageMagic-ImageMagick-6.8.6-4-Q16-x64-dll版本,确切地说,当然还有开发人员标题。它们都直接位于各自子文件夹中的C:drive上,名称中没有空格。 然后我试着做一块宝石

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagi
ck-6.8.6-Q16/lib——带opt include=c:/ImageMagick-6.8.6-Q16/include

输出是

    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.

    C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.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=C:/Ruby200-x64/bin/ruby
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to ge
nerate an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header
'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for
'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in p
ostpone'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
        from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'
        from extconf.rb:194:in `<main>'


Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagi
ck-2.13.2 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMa
gick/gem_make.out
临时增强包含DevKit的路径。。。
构建本机扩展。这可能需要一段时间。。。
错误:安装rmagick时出错:
错误:无法生成gem本机扩展。
C:/Ruby200-x64/bin/ruby.exe extconf.rb
正在检查Ruby版本>=1.8.5。。。对
正在检查stdint.h...**extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=C:/Ruby200-x64/bin/ruby
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in'try_-do':编译器未能
生成一个可执行文件。(运行时错误)
您必须首先安装开发工具。
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in'try_cpp'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in`block in have_头
'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in`block in checking_
'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in`block(2层)in`p
ostpone'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in'open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in'block in delay'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in'open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in“推迟”
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in'checking_'
来自C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in'have_header'
来自extconf.rb:194:in`'
Gem文件仍将安装在C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagi中
ck-2.13.2用于检查。
结果记录到C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMa
gick/gem_化妆品
但是,我认为问题不在stdint.h文件中。然后我检查文件的内容

c:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\rmagick-2.13.2\ext\rmagick\

那是

    checking for Ruby version >= 1.8.5... -------------------- yes

--------------------

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -Ic:/ImageMagick-6.8.6-Q16/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c  -L. -LC:/Ruby200-x64/lib -Lc:/ImageMagick-6.8.6-Q16/lib -L.    -lCORE_RL_magick_ -lX11  -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  "
c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick-6.8.6-Q16/lib/X11.lib when searching for -lX11
c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick-6.8.6-Q16/lib/X11.lib when searching for -lX11
c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick-6.8.6-Q16/lib\X11.lib when searching for -lX11
c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lX11
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */
正在检查Ruby版本>=1.8.5…------------对
--------------------
“x86_64-w64-mingw32-gcc-o conftest.exe-IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32-IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward-IC:/Ruby200-x64/include/ruby-2.0.0-I.-IC:/ImageMagick-6.8.6-Q16/include-DFD\u SETSIZE=2048-D\u WINNT=0x0501-D\u FILE\u OFFSET\u BITS=64-O3-fno-fno-Wall未使用的快速数学指针-参数-Wno括号-Wno long long-Wno缺少字段初始值设定项-Wunused变量-Wpointer arith-Wwrite strings-Wdeclaration after语句-Wimplicit函数声明conftest.c-L-LC:/Ruby200-x64/lib-LC:/ImageMagick-6.8.6-Q16/lib-L-lCORE\u RL\u magick\lX11-lx64-lx64-msvcrt-Ruby200-lshell32-limagehlp-lshlwapi "
c:/devkit-x64/mingw/bin/./lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../../../x86_64-w64-mingw32/bin/ld.exe:搜索-lX11时跳过不兼容的c:/ImageMagick-6.8.6-Q16/lib/X11.lib
c:/devkit-x64/mingw/bin/./lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../../../x86_64-w64-mingw32/bin/ld.exe:搜索-lX11时跳过不兼容的c:/ImageMagick-6.8.6-Q16/lib/X11.lib
c:/devkit-x64/mingw/bin/./lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../../../x86_64-w64-mingw32/bin/ld.exe:搜索-lX11时跳过不兼容的c:/ImageMagick-6.8.6-Q16/lib\X11.lib
c:/devkit-x64/mingw/bin/./lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../../../x86_64-w64-mingw32/bin/ld.exe:找不到-lX11
collect2.exe:错误:ld返回了1个退出状态
检查的程序是:
/*开始*/
1:#包括“ruby.h”
2: 
3:#包括
4:#包括
5:int main(int argc,字符**argv)
6: {
7:返回0;
8: }
/*结束*/
这似乎是X11.lib文件的问题。当然,它位于ImageMagick lib文件夹中,日期是2009年,我不知道下一步该怎么做,也不知道该怎么想。
由于我正在处理一个大文件-6000x6000像素,我希望在可能的情况下使用64位版本。

我遇到了同样的问题。在ImageMagick 6.8.6中使用Ruby 2.0.0p247和gem 2.0.7

我试过使用32位和64位版本的ImageMagick。在这两种情况下,终端输出相同:

$ gem install rmagick --platform=ruby -- --with-opt-dir=/c/ImageMagick64
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir=c:/ImageMagick64'
This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

    c:/Ruby200-x64/bin/ruby.exe extconf.rb --with-opt-dir=c:/ImageMagick64
checking for Ruby version >= 1.8.5... yes
checking for stdint.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
        --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:/Ruby200-x64/bin/ruby
c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to ge
nerate an executable file. (RuntimeError)
You have to install development tools first.
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header
'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for
'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in p
ostpone'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
        from c:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'
        from extconf.rb:194:in `<main>'


Gem files will remain installed in c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagi
ck-2.13.2 for inspection.
Results logged to c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMa
gick/gem_make.out
$gem安装rmagick--platform=ruby--with opt dir=/c/ImageMagick64
暂时增强包含DevKit的路径。。。
使用“--with opt dir=c:/ImageMagick64”生成本机扩展
这可能需要一段时间。。。
错误:安装rmagick时出错:
错误:无法生成gem本机扩展。
c:/Ruby200-x64/bin/ruby.exe extconf.rb——带opt dir=c:/ImageMagick64
正在检查Ruby版本>=1.8.5。。。对
正在检查stdint.h...**extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=c:/Ruby200-x64/bin/ruby
c:/Ruby2
checking for Ruby version >= 1.8.5... -------------------- yes

--------------------

"x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -Ic:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -Ic:/Ruby200-x64/include/ruby-2.0.0 -I. -Ic:/ImageMagick64/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c  -L. -Lc:/Ruby200-x64/lib -Lc:/ImageMagick64/lib -L.    -lCORE_RL_magick_ -lX11  -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  "
c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick64/lib/X11.lib when searching for -lX11
c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick64/lib/X11.lib when searching for -lX11
c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/ImageMagick64/lib\X11.lib when searching for -lX11
c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lX11
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */