mysql2在0x00000000000000处出现分段错误

vddsk6oq  于 2023-02-28  发布在  Mysql
关注(0)|答案(2)|浏览(155)

我从FreeBSD 11.3的端口安装了Redmine,现在尝试从浏览器访问它,它崩溃了。错误日志显示如下。

/usr/local/lib/ruby/gems/2.6/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
    /usr/local/lib/ruby/gems/2.6/gems/mysql2-0.4.10/lib/mysql2/mysql2.so: [BUG] Segmentation fault at 0x0000000000000000
    ruby 2.6.6p146 (2020-03-31 revision 67876) [amd64-freebsd11]
-- Control frame information -----------------------------------------------
c:0027 p:-4313666350 s:0131 e:000130 TOP    [FINISH]
c:0026 p:---- s:0128 e:000127 CFUNC  :require
c:0025 p:0261 s:0123 e:000122 TOP    /usr/local/lib/ruby/gems/2.6/gems/mysql2-0.4.10/lib/mysql2.rb:31 [FINISH]
c:0024 p:---- s:0119 e:000118 CFUNC  :require
c:0023 p:0033 s:0114 e:000113 BLOCK  /usr/local/lib/ruby/gems/2.6/gems/bundler-2.0.2/lib/bundler/runtime.rb:81 [FINISH]

输出长得多,我缩短了它,这是堆栈中最重要的错误。我不确定哪个社区会更好地解决这个问题,所以我决定先问这里。

fbcarpbf

fbcarpbf1#

今天我在ubuntu20.04和msql 2-v0.5.1上遇到了类似的问题。

sudo apt remove libmysqlclient-dev
sudo apt install libmariadbclient-dev
gem install mysql2 -v '0.5.1'

在此更详细地描述:https://github.com/brianmario/mysql2/issues/1075
或对于更高版本:

sudo apt remove libmariadbd-dev
sudo apt install libmariadbd-dev
gem install mysql2 -v 'your version'
ni65a41a

ni65a41a2#

libmariadbclient-dev在ubuntu 22上对我来说并不存在:必须安装libmariadbd-dev,然后重新安装mysql 2 gem。

相关问题