代码之家  ›  专栏  ›  技术社区  ›  willnode

x86\u 64-w64-mingw32/bin/ld。exe:找不到-lgmp

  •  1
  • willnode  · 技术社区  · 8 年前

    我正在尝试安装 jekyll 下列的 Jekyll in Windows 通过Choco,但在 gem install jekyll

    全输出:

    C:\Users\WILLNODE>gem install jekyll
    Temporarily enhancing PATH for MSYS/MINGW...
    Building native extensions.  This could take a while...
    ERROR:  Error installing jekyll:
            ERROR: Failed to build gem native extension.
    
        current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
    C:/Tools/ruby24/bin/ruby.exe -r ./siteconf20180129-7284-12v8uaa.rb extconf.rb
    creating Makefile
    
    current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
    make "DESTDIR=" clean
    
    current directory: C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
    make "DESTDIR="
    generating ruby_http_parser-x64-mingw32.def
    compiling ruby_http_parser.c
    compiling ryah_http_parser.c
    linking shared-object ruby_http_parser.so
    c:/tools/devkit2/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
    collect2.exe: error: ld returned 1 exit status
    make: *** [ruby_http_parser.so] Error 1
    
    make failed, exit code 2
    
    Gem files will remain installed in C:/Tools/ruby24/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0 for inspection.
    Results logged to C:/Tools/ruby24/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/http_parser.rb-0.6.0/gem_make.out
    

    以下为 this answer 我跑步 ld -lgmp --verbose

    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib\libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib\libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib\libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/local/lib\gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/lib\gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.a failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.lib failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/libgmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib/gmp.dll failed
    attempt to open /home/ruben/mingw-w64/mingw64mingw64/mingw64/usr/lib\gmp.lib failed
    ld: cannot find -lgmp
    

    但我仍然不知道为什么会发生这种情况。

    肯定少了什么东西。但这是什么?

    额外信息(如有必要):Windows 10 64位,Ruby24

    1 回复  |  直到 8 年前
        1
  •  0
  •   willnode    8 年前

    奇怪的是,我最终安装了Ruby 2.3版。x使用 rubyinstaller.org 它工作得很好。这可能是因为我的DevKit安装不正确(我猜:我 ridk install 并仅选择1)。

    无论如何,我还是更喜欢2.3版本,因为您只需要下载压缩文件就可以让DevKit正常工作。