开发者

problem with gem install mysql on windows server 2008 r2

rails version 2.3.5 ruby version 1.8.7

PS C:\Ruby187\apps\redmine> gem install mysql
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
    ERROR:  Error installing mysql:
            ERROR: Failed to build gem native extension.

    C:/Ruby187/bin/ruby.exe extconf.rb
    checking for main() in -llibmysql... no
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers.  Check the mkmf.l开发者_StackOverflow社区og 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:/Ruby187/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


    Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
    Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out


There is already a pre-built binary of mysql 2.8.1 gem on rubygems.org:

https://rubygems.org/gems/mysql/versions/2.8.1-x86-mingw32

Unless you're forcing --platform=ruby in which case you need MySQL headers and linking libraries.

You also need RubyInstaller DevKit, if that is the Ruby version you're trying to use.

See this post in our group here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜