gpt4 book ai didi

ruby-on-rails - 在 Ubuntu 上使用 ruby​​ 2.4.0 安装 json 1.8.3 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 07:49:20 24 4
gpt4 key购买 nike

<分区>

我正在尝试在我的本地计算机 (Ubuntu 15.10) 上运行一个开源 Web 应用程序。当我运行 bundle 命令时,我得到了这个

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

current directory:
/home/yesh/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/home/yesh/.rbenv/versions/2.4.0/bin/ruby -r ./siteconf20170310-4319-tlc92v.rb
extconf.rb
creating Makefile

current directory:
/home/yesh/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/home/yesh/.rbenv/versions/2.4.0/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:25: error: ‘rb_cFixnum’ undeclared (first use in this function)
} else if (klass == rb_cFixnum) {
^
generator.c:861:25: note: each undeclared identifier is reported only once for
each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function)
} else if (klass == rb_cBignum) {
^
generator.c: 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’
Makefile:241: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/yesh/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/json-1.8.3 for
inspection.
Results logged to
/home/yesh/.rbenv/versions/2.4.0/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' 但再次收到与上述相同的错误消息。请帮助解决这个问题。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com