MySQL Failed to build gem native extension.

319 views
Skip to first unread message

Michał Rachtan

unread,
Jan 12, 2015, 6:46:44 PM1/12/15
to rubyge...@googlegroups.com
I can't install mysql2 on Windows 8.1 64x (I have lates ruby,gems,devkit and mysql).
I tryed everything i found on this topic and nothing worked.


Microsoft Windows [Version 6.3.9600] 
(c) 2013 Microsoft Corporation. Wszelkie prawa zastrzeżone.
C:\Windows\system32>gem install mysql2
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.
    C:/Ruby21-x64/bin/ruby.exe -r ./siteconf20150113-10388-5dntfi.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for mysql_query() in -lmysqlclient... *** 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-mysql-config
        --without-mysql-config
        --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-mysqlclientlib
        --without-mysqlclientlib
C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:395:in `system': Invalid argument - ruby_se
tenv(USER) (Errno::EINVAL)
        from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:395:in `block in xsystem'
        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:385:in `xsystem'
        from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:463:in `try_do'
        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:999:in `block in find_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:995:in `find_library'
        from extconf.rb:70:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql2
-0.3.17 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/mysql2-0.3.17/gem_make.out
C:\Windows\system32>

kee...@thebrocks.net

unread,
Jan 13, 2015, 11:19:59 AM1/13/15
to rubyge...@googlegroups.com
Hi Michal,

This list is general and focused on helping with the infrastructure of finding gems.

For this particular problem, you may want to visit the issue tracker for https://github.com/brianmario/mysql2
They may also have a mailing list for helping you with your issue.

Best of Luck,
Keenan

--
You received this message because you are subscribed to the Google Groups "rubygems.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubygems-org...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages