简体   繁体   English

安装wdm gem时出现错误消息

[英]Error message upon installing wdm gem

I followed this guide here on installing jekyll: labs.sverrirs.com/jekyll/5-wdm-gem.html 我在安装jekyll时遵循了此指南:labs.sverrirs.com/jekyll/5-wdm-gem.html

But I can't seem to install wdm. 但是我似乎无法安装wdm。 I installed Ruby-devkit, and ruby2.3 64bit. 我安装了Ruby-devkit和ruby2.3 64bit。 However, when I try to type in gem install wdm, it displays: 但是,当我尝试输入gem install wdm时,它显示:

To see why this extension failed to compile, please check the mkmf.log which can be found here: 要查看此扩展为何无法编译,请检查mkmf.log,可在此处找到:

 C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/wdm-0.1.1/mkmf.
log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.
1.1 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0
/wdm-0.1.1/gem_make.out

The mkmf file says this: mkmf文件说:

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby23-x64/include/ruby-2.3.0/x64-mingw32 -IC:/Ruby23-x64/include/ruby-2.3.0/ruby/backward -IC:/Ruby23-x64/include/ruby-2.3.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -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 -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L. -LC:/Ruby23-x64/lib -L.      -lx64-msvcrt-ruby230  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
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 */

I have no idea what this means, what to do? 我不知道这意味着什么,怎么办?

The gem file: gem文件:

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.1/ext/wdm
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20161205-2832-xgt8yg.rb extconf.rb
checking for main() in -lkernel32... *** 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:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
    --with-kernel32lib
    --without-kernel32lib
C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:997:in `block in have_library'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:320:in `open'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
    from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:992:in `have_library'
    from extconf.rb:19:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/wdm-0.1.1/mkmf.log

extconf failed, exit code 1

Could you please paste the content of the mkmf.log file and gem_make.out? 您能否粘贴mkmf.log文件和gem_make.out的内容?

I just tried to install the gem on a Win10 running Ruby 64bit and this does not seem to be an issue. 我只是试图在运行Ruby 64位的Win10上安装gem,但这似乎不是问题。

Edit: OK, the error states, that your devkit is not installed correctly. 编辑:确定,错误指出,您的devkit没有正确安装。 Did you follow the instructions on ruby's website and install the correct version for your ruby version? 您是否遵循ruby网站上的说明并为您的ruby版本安装了正确的版本?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM