使用mingw编译mysql2时出现分段错误 [英] Segmentation fault when compiling mysql2 with mingw
问题描述
当我尝试创建Rails服务器时,这就是我得到的.它立即运行超过500多行代码,并返回此消息.这是我的第一个Ruby on Rails项目.我对编码也很陌生.如果可能的话,希望能提供一些帮助.谢谢!
When I try to create a Rails server this is what I get. It instantly runs over 500+ lines of code and comes back with this message. This is my first Ruby on Rails project. I am pretty new to coding as well. Would love some help if possible. Thank you!
C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.15/my
sql2/mysql2.so: [BUG] Segmentation fault
ruby 2.0.0p451 (2014-02-24) [x64-mingw32]
0 enumerator.so
1 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/encdb.so
2 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/iso_8859_1.so
3 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/trans/transdb.so
4 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/rbconfig.rb
5 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/compatibility.rb
6 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/defaults.rb
7 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/deprecate.rb
8 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/errors.rb
9 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/version.rb
10 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb
11 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/platform.rb
12 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/basic_specification.rb
13 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/stub_specification.rb
14 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/util/stringio.rb
15 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb
16 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/exceptions.rb
17 C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/defaults/operating_system.rb
18 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/utf_16le.so
19 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/trans/utf_16_32.so
20 C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
537 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_sup
port/core_ext/module.rb
538 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_view/r
ecord_identifier.rb
539 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_view/h
elpers/record_tag_helper.rb
540 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_view/h
elpers/rendering_helper.rb
541 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_view/h
elpers/translation_helper.rb
542 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0/lib/action_view/h
elpers.rb
543 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.0.1/lib/sprocket
s/rails/helper.rb
544 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/engine/co
nfiguration.rb
545 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applicati
on/configuration.rb
546 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sprockets-rails-2.0.1/lib/sprocket
s/railtie.rb
547 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/all.rb
548 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_sup
port/string_inquirer.rb
549 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2/version.r
b
550 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2/error.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
C:\Users\MVParker\Documents\Sites\simple_cms>
推荐答案
我在"x64-mingw32 mysql2 Segmentation fault"上进行了搜索,并发现了以下内容:
I googled "x64-mingw32 mysql2 Segmentation fault" and found this: https://bugs.ruby-lang.org/issues/8591
看起来mysql2中有错误.关于Ruby问题的评论提供了一种解决方法,即使用编译器重新生成libmysql.lib.请报告,并通知我们是否可行.
Looks like there is a bug in mysql2. A comment on the Ruby issue gives a workaround, regenerating libmysql.lib with your compiler. Please report back and let us know if it works.
这篇关于使用mingw编译mysql2时出现分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!