安装ruby环境,用mysql数据库,总是报错,调了一下午,网上方法都用了也不管事

报错信息:windowsxp系统,ruby2.0Gem::Installer::ExtensionBuildError:ERROR:Failedtobuildgemnat... 报错信息:windows xp系统,ruby2.0
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extensio
C:/Ruby200/bin/ruby.exe 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... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... 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:
-
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0
3.16 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.16/ext/mysql2/
em_make.out
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue

Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.
展开
 我来答
百度网友81bb8d7
推荐于2017-11-26 · TA获得超过593个赞
知道小有建树答主
回答量:392
采纳率:0%
帮助的人:229万
展开全部
make的时候需要调用ruby很多编译前的参数.一些信息make不知道的话会不知道如何建库.
我个人的建议是根据你安装的ruby路径和版本信息把配置选项补充全.下面是我电脑上面的配置,你可以借鉴一下.据我分析应该能解决你的问题.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/usr/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/ruby-2.1.2/rubies/ruby-2.1.2/bin/ruby
追问
我昨天已经解决,不过还是同样感谢
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式