Fehler beim Installieren des nativen Ruby Gem wdm 0.1.1 unter Windows 7 x64 (Ruby 2.2.0)

793
Neon

Veraltete Story (finden Sie das Update unter der nächsten Überschrift)

Ich kann nicht herausfinden, warum wdmich mich nicht auf meinem Computer installieren kann. Ich habe versucht, die Cygwin-Bash, Windows-Cmd und GIT-Bash zu verwenden.

Konsolenausgabe:

$ gem install wdm Building native extensions. This could take a while... ERROR: Error installing wdm: ERROR: Failed to build gem native extension.  c:/Ruby22-x64/bin/ruby.exe -r ./siteconf20151202-6644-1ws9slg.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=$/include --with-opt-lib --without-opt-lib=$/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=c:/Ruby22-x64/bin/$(RUBY_BASE_NAME) --with-kernel32lib --without-kernel32lib c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to gen erate an executable file. (RuntimeError) You have to install development tools first. from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:556:in `try_link' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:735:in `try_func' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:966:in `block in have_library'  from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'  from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in po stpone' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:321:in `open' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:321:in `open' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:347:in `postpone' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for' from c:/Ruby22-x64/lib/ruby/2.2.0/mkmf.rb:961:in `have_library' from extconf.rb:19:in `<main>'  extconf failed, exit code 1  Gem files will remain installed in c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/wdm-0. 1.1 for inspection. Results logged to c:/Ruby22-x6 

mkmf.log :

"x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/Ruby22-x64/include/ruby-2.2.0/x64-mingw32 -Ic:/Ruby22-x64/include/ruby-2.2.0/ruby/backward -Ic:/Ruby22-x64/include/ruby-2.2.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:/Ruby22-x64/lib -L. -lx64-msvcrt-ruby220 -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 */ 

Update 1

Obwohl ich eine Cygwin- Umgebung habe, in der gcc ausgeführt wird, enthielt der Satz "Sie müssen zuerst Entwicklungswerkzeuge installieren" den folgenden Pro-Tipp. Genauer gesagt fehlte mir der x86_64-w64-mingw32-gccCompiler. Ich habe das Installationsprogramm von SourceForge heruntergeladen (der Link zum Installationsprogramm-Download befindet sich über der Dateiliste) und konnte beim zweiten Versuch installiert werden (der erste Versuch schlug mit einer fehlgeschlagenen Download- Nachricht fehl ; es scheint zufällig zu sein).

Es funktioniert jedoch immer noch nicht.

Konsolenausgabe:

$ gem install wdm Building native extensions. This could take a while... ERROR: Error installing wdm: ERROR: Failed to build gem native extension. 

Auch Konsolenausgabe, aber das ist auch der Inhalt der gem_make.out:

c:/Ruby22-x64/bin/ruby.exe -r ./siteconf20151204-42084-zsi0td.rb extconf.rb checking for main() in -lkernel32... yes checking for windows.h... yes checking for ruby.h... yes checking for HAVE_RUBY_ENCODING_H... yes checking for rb_thread_call_without_gvl()... yes creating Makefile  make "DESTDIR=" clean  make "DESTDIR=" generating wdm_ext-x64-mingw32.def /bin/sh: /c/Ruby22-x64/bin/ruby: No such file or directory Makefile:260: recipe for target 'wdm_ext-x64-mingw32.def' failed make: *** [wdm_ext-x64-mingw32.def] Error 127  make failed, exit code 2 

Weitere Konsolenausgabe:

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

Die Linie /bin/sh: /c/Ruby22-x64/bin/ruby: No such file or directoryverwirrt mich. Dies geschieht in allen drei Shells, Cygwin, GIT Bash sowie CMD . Im GIT Bash kann ich den Pfad /c/Ruby22-x64/bin/rubymanuell auflösen . Es existiert und funktioniert. Zeigt auch which rubynach rechts ruby.

2

0 Antworten auf die Frage