【问题标题】:Ruby JSON gem install error: Ruby 2.4.1, JSON 1.8.6 (Windows 10)Ruby JSON gem 安装错误:Ruby 2.4.1、JSON 1.8.6 (Windows 10)
【发布时间】:2018-02-15 16:34:05
【问题描述】:

运行 gem install json 并收到以下错误

Fetching: json-1.8.6.gem (100%)
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions.  This could take a while...
      1 [main] make 8392 child_info_fork::abort: C:\msys32\usr\bin\msys-intl-8.dll: Loaded to different address: parent(0x30000) != child(0x20000)
      1 [main] make 332 child_info_fork::abort: C:\msys32\usr\bin\msys-intl-8.dll: Loaded to different address: parent(0x20000) != child(0x30000)
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.6/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20170904-8096-t8xlbq.rb extconf.rb
creating Makefile

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.6/ext/json/ext/generator
make "DESTDIR=" clean
      1 [main] make 8392 child_info_fork::abort: C:\msys32\usr\bin\msys-intl-8.dll: Loaded to different address: parent(0x30000) != child(0x20000)
make: fork: Resource temporarily unavailable

current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.6/ext/json/ext/generator
make "DESTDIR="
generating generator-x64-mingw32.def
      1 [main] make 332 child_info_fork::abort: C:\msys32\usr\bin\msys-intl-8.dll: Loaded to different address: parent(0x20000) != child(0x30000)
make: fork: Resource temporarily unavailable

make failed, exit code 2

Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.6 for inspection.
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-1.8.6/gem_make.out

使用

  • Ruby 2.4.1
  • Windows 10 (x64)

在 Google 或此处找不到任何帖子。

任何想法都将不胜感激。

【问题讨论】:

    标签: ruby rubygems


    【解决方案1】:

    Ruby 2.4 relies on json >= 2.0 并且您正在尝试安装 json 1.8.6。它们是不相容的。确保两个版本兼容,然后重试您的操作。

    【讨论】:

    • 标记为正确答案。 Windows 不支持 JSON 的必要版本,这就是他提出问题的原因,但这个答案仍然是正确的。
    猜你喜欢
    • 2021-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-05
    • 1970-01-01
    • 2014-01-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多