Gem :: Ext :: BuildError:错误:无法构建gem本机扩展.在CenOS 6.5上 [英] Gem::Ext::BuildError: ERROR: Failed to build gem native extension. on CenOS 6.5

查看:78
本文介绍了Gem :: Ext :: BuildError:错误:无法构建gem本机扩展.在CenOS 6.5上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Redmine. 我已经尝试过了,

Installing Redmine. I've tried,

bundle install --without development test postgresql sqlite

,但出错.

Gem :: Ext :: BuildError:错误:无法构建gem本机扩展.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/usr/local/bin/ruby -r ./siteconf20161228-21055-1dxe9y9.rb extconf.rb
creating Makefile

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861: error: ‘rb_cFixnum’ undeclared (first use in this
function)
generator.c:861: error: (Each undeclared identifier is reported only
once
generator.c:861: error: for each function it appears in.)
generator.c:863: error: ‘rb_cBignum’ undeclared (first use in this
function)
At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign"
cc1: warning: unrecognized command line option
"-Wno-constant-logical-operand"
cc1: warning: unrecognized command line option
"-Wno-parentheses-equality"
cc1: warning: unrecognized command line option
"-Wno-tautological-compare"
make: *** [generator.o] error 1

make failed, exit code 2

Gem files will remain installed in
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler
cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before
bundling.

因此,我尝试了gem install json -v '1.8.3,但无法解决.

So, I've tried gem install json -v '1.8.3, but I couldn't solve it.

您介意读这个问题吗?

推荐答案

Ruby 2.4是非常新的.实际上,它是在3天前发布的.

Ruby 2.4 is very new. In fact, it was released only 3 days ago.

由于Ruby 2.4中发生了一些重要的内部更改,因此很可能许多宝石(以及Redmine本身)尚未与此版本的Ruby兼容.

Since there are several impirtant internal changes in Ruby 2.4, it is quite likely that many gems (and Redmine itself) are not yet compatible with this version of Ruby.

从您的错误消息中看来,确实确实需要修改JSON gem才能处理Ruby 2.4中有关整数的某些更改.

From your error message, it does indeed seem that the JSON gem needs to be adapted in order to handle some changes in Ruby 2.4 regarding whole numbers.

您现在应该使用旧版本的Ruby,例如Ruby 2.3.3.如您在 http://www.redmine.org/projects上看到的/redmine/wiki/RedmineInstall#Ruby-interpreter ,根据Redmine的版本,Redmine需要特定的Ruby版本.

You should use an older version of Ruby for now, e.g. Ruby 2.3.3. As you can see on http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter, Redmine requires specific Ruby versions depending on the version of Redmine.

这篇关于Gem :: Ext :: BuildError:错误:无法构建gem本机扩展.在CenOS 6.5上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆