2014-04-28 1 views
2

J'utilise ce package pour utiliser chef dans Windows. http://www.opscode.com/chef/install.msi`gem install berkshelf` dans Windows échoue

Lorsque je cours $ gem install berkshelf, j'ai cette erreur. Comment réparer cette erreur?

Temporarily enhancing PATH to include DevKit... 
Building native extensions. This could take a while... 
Fetching: dep_selector-1.0.3.gem (100%) 
Building native extensions. This could take a while... 
ERROR: Error installing berkshelf: 
     ERROR: Failed to build gem native extension. 

     C:/opscode/chef/embedded/bin/ruby.exe extconf.rb 
checking for main() in -lgecodesupport... yes 
checking for main() in -lgecodesupport... yes 
checking for main() in -lgecodekernel... yes 
checking for main() in -lgecodeint... yes 
checking for main() in -lgecodeminimodel... yes 
checking for main() in -lgecodesearch... yes 
creating Makefile 

make 
generating dep_gecode-i386-mingw32.def 
compiling define_dummy_init.cxx 
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/O 
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C 
compiling dep_selector_to_gecode.cpp 
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/O 
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C 
In file included from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libge 
0, 
       from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libge 
45, 
       from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libge 

       from dep_selector_to_gecode.cpp:20: 
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.0/lib/dep-sel 
pscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.0/lib/dep-selecto 
d 
compilation terminated. 
make: *** [dep_selector_to_gecode.o] Error 1 


Gem files will remain installed in C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep_s 
Results logged to C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep_selector-1.0.3/ext 

Ceci est mon environnement.

$ ruby -v 
ruby 1.9.3p484 (2013-11-22) [i386-mingw32] 
$ where ruby 
C:\opscode\chef\embedded\bin\ruby.exe 
+0

Utilisez plutôt ChefDK. – sethvargo

+1

Apparemment non disponible pour le moment. http://www.getchef.com/downloads/chef-dk/windows/ – ironsand

Répondre

0

J'ai trouvé le même problème sous Windows lorsque vous utilisez bash Git, mais le petit bijou de berkshelf installé sur OK lorsque vous utilisez une fenêtre de commande.

+1

Ceci fournit une réponse. Le répondeur a dit que l'utilisation de la fenêtre Git bash provoquerait l'échec de l'installation de gem, mais l'utilisation d'une fenêtre de commande régulière résoudrait le problème. –