繁体   English   中英

无法在Windows 8.1和ruby版本2.1.5中安装mysql-2.9.1.gem

[英]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.

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