[英]unable to install mysql-2.9.1.gem in windows 8.1 with ruby version 2.1.5
我正在使用Ruby 2.1.5,其余的細節是
*當地的寶石*
bigdecimal(1.2.4)io控制台(0.4.2)json(1.8.1)minitest(4.7.5)mysql(2.8.1 x86-mingw32)Psych(2.0.5)瑞克(10.1.0)rdoc(4.1 .0)測試單位(2.1.5.0)
當我正在安裝mysql-2.9.1.gem時,出現如下錯誤:
Building native extensions. This could take a while...
ERROR: Error installing mysql-2.9.1.gem:
ERROR: Failed to build gem native extension.
C:/Ruby21-x64/bin/ruby.exe extconf.rb
checking for main() in -llibmysql... *** 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:/Ruby21-x64/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib
C:/Ruby21-x64/lib/ruby/2.1.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:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in po
stpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:27:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql-
2.9.1 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/mysql-2.9.1/gem_make.out
D:\Softwares>
我在安裝mysql gem時也遇到了這個問題。 也許這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.