win8.1x64zh_cn,ruby2.1.3x64wininstaller安装,devkit已安装DevKit-mingw64-64-4.7.2-20130224-1432-sfx问题来了:requiremysql找不到,于是安装mysql的dbi,geminstallmysql,报错...

win8.1 x64 zh_cn ,ruby 2.1.3 x64 win installer安装,devkit已安装 DevKit-mingw64-64-4.7.2-20130224-1432-sfx

问题来了:

require mysql找不到,于是安装mysql的dbi,gem install mysql,报错信息如下,请问怎么破?谢谢!

D:\Ruby21-x64\devkit>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.

d:/Ruby21-x64/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.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=d:/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

extconf failed, exit code 1

Gem files will remain installed in d:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql-

2.9.1 for inspection.

Results logged to d:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0

/mysql-2.9.1/gem_make.out

d:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': 126: 找不到指定的模块。 - d:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/mysql-2.9.1/mysql/mysql_api.so (LoadError)

程序很简单,就是require “mysql”看看能不能成功。

展开

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐