简体   繁体   English

安装 json (1.8.1) 时出错,Bundler 无法继续

[英]An error occurred while installing json (1.8.1) and Bundler cannot continue

when I try to run bundle install , I got the following error:当我尝试运行 bundle install 时,出现以下错误:

Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.9
Installing json 1.8.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/geethu/.rvm/gems/ruby-2.3.1/gems/json-1.8.1/ext/json/ext/generator/home/geethu/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20201013-6347-q8bzg1.rb extconf.rb

creating Makefile current directory: /home/geethu/.rvm/gems/ruby-2.3.1/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR=" clean current directory: /home/geethu/.rvm/gems/ruby-2.3.1/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR=" compiling generator.c创建 Makefile 当前目录:/home/geethu/.rvm/gems/ruby-2.3.1/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR="clean current directory: /home/geehu/ .rvm/gems/ruby-2.3.1/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR="编译generator.c

../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:

../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given VALUE result = rb_str_new(FBUFFER_PAIR(fb)); ../fbuffer/fbuffer.h:175:47: 错误:宏“rb_str_new”需要 2 个参数,但只有 1 个给定 VALUE 结果 = rb_str_new(FBUFFER_PAIR(fb));

../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast [-Wint-conversion]

VALUE result = rb_str_new(FBUFFER_PAIR(fb)); VALUE 结果 = rb_str_new(FBUFFER_PAIR(fb));

Makefile:238: recipe for target 'generator.o' failed

make: *** [generator.o] Error 1 make: *** [generator.o] 错误 1

make failed, exit code 2
Gem files will remain installed in /home/geethu/.rvm/gems/ruby-2.3.1/gems/json-1.8.1 for inspection.

Results logged to /home/geethu/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/json-1.8.1/gem_make.out结果记录到 /home/geethu/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/json-1.8.1/gem_make.out

Using minitest 5.3.4
Using thread_safe 0.3.4
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using bcrypt 3.1.7
Using coderay 1.1.0
Using debug_inspector 0.0.2
Using bundler 1.12.5
Using callsite 0.0.11
Using cancan 1.6.10
Using coffee-script-source 1.7.0
Using execjs 2.1.0
Using thor 0.19.1
Using currencies 0.4.2
Using database_cleaner 1.3.0
Using orm_adapter 0.5.0
Using diff-lcs 1.2.5
Using tilt 1.4.1
Using hike 1.2.3
Using multi_json 1.10.1
Using method_source 0.8.2
Using subexec 0.2.3
Using mini_portile 0.6.0
Using mousetrap-rails 1.4.6
Using nested_form 0.3.2
Using pg 0.17.1
Using slop 3.5.0
Using rolify 3.4.0
Using rspec-core 2.14.8
Using rspec-mocks 2.14.6
Using rubyzip 1.1.3
Using sass 3.2.19
Using workflow 1.1.0
An error occurred while installing json (1.8.1), and Bundler cannot continue.

Make sure that gem install json -v '1.8.1' succeeds before bundling.在捆绑之前确保gem install json -v '1.8.1'成功。

Try updating your Gemfile to use json@1.8.2 instead of 1.8.1 - according to this thread Ruby 2.2.x is incompatible with json 1.8.1 .尝试更新您的Gemfile以使用json@1.8.2而不是1.8.1 - 根据此线程Ruby 2.2.x is incompatible with json 1.8.1

1.8.2 should be functionally similar and not affect any of your other dependencies. 1.8.2应该在功能上相似并且不会影响您的任何其他依赖项。

You can also run bundle update json to let bundler try to fix it for you - but that may put you at a much later version than 1.8.2 , I'm not sure.您还可以运行bundle update json以让 bundler 尝试为您修复它 - 但这可能会使您的版本比1.8.2晚得多,我不确定。

No harm in trying a couple things and reverting your changes.尝试一些事情并恢复您的更改没有坏处。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装json(1.8.1)时发生错误,Bundler无法继续 - Rails - An error occurred while installing json (1.8.1), and Bundler cannot continue - Rails 得到以下错误安装json(1.8.1)时发生错误,并且Bundler无法继续 - Getting following error An error occurred while installing json (1.8.1), and Bundler cannot continue 安装 json (1.7.6) 时出错,Bundler 无法继续。 - An error occurred while installing json (1.7.6), and Bundler cannot continue. Rails中的“安装json(1.8.0)时发生错误,并且Bundler无法继续” - “An error occurred while installing json (1.8.0), and Bundler cannot continue” in Rails 安装json(1.8.6)时出错,Bundler无法继续 - An error occurred while installing json (1.8.6), and Bundler cannot continue 安装atomic(1.1.16)时发生错误,Bundler无法继续 - An error occurred while installing atomic (1.1.16) and Bundler cannot continue 安装RedCloth(4.2.7)时发生错误,并且Bundler无法继续 - An error occurred while installing RedCloth (4.2.7), and Bundler cannot continue 安装mysql(2.9.1)时出错,Bundler无法继续 - An error occurred while installing mysql (2.9.1), and Bundler cannot continue 安装mysql(2.9.1)时发生错误,Bundler无法继续 - An error occurred while installing mysql (2.9.1) and Bundler cannot continue n在安装atomic(1.1.14)时发生错误,并且Bundler无法继续 - n error occurred while installing atomic (1.1.14), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM