安装ruby gem json v1.8.3时出错:BFD(GNU Binutils for Debian)2.22内部错误

Ser*_*kiy 5 ruby linux json compiler-errors binutils

当我尝试安装ruby gem json 1.8.3时,我看到类似于C编译器错误的东西

这是我正在运行的命令:

gem install json -v '1.8.3'
Run Code Online (Sandbox Code Playgroud)

我的输出是:

Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20160327-27188-189i1cj.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 internal error, aborting at ../../bfd/reloc.c line 443 in bfd_get_reloc_size

/usr/bin/ld: Please report this bug.

collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.1/gems/json-1.8.3 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.1/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out
Run Code Online (Sandbox Code Playgroud)

我尝试删除和安装包binutilsbuild-essential,但这并没有解决问题.

关于我的OS的一些事实:

Debian GNU/Linux 7.9 (wheezy)
Run Code Online (Sandbox Code Playgroud)

uname -a显示:

Linux Prometheus 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 2015 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

我在OpenVZ虚拟化VPS主机上运行它.

我的/etc/apt/sources.list(如果它有帮助):

deb http://ftp.debian.org/debian wheezy main contrib non-free
deb http://security.debian.org wheezy/updates main contrib non-free
deb http://packages.icinga.org/debian icinga-wheezy main
deb http://http.debian.net/debian wheezy-backports main
deb-src http://packages.icinga.org/debian icinga-wheezy main
Run Code Online (Sandbox Code Playgroud)

谷歌的相关结果为零

BFD (GNU Binutils for Debian) 2.22 internal error, aborting at ../../bfd/reloc.c line 443 in bfd_get_reloc_size
Run Code Online (Sandbox Code Playgroud)

如果由于链接器错误我无法"制作"json gem,请告诉我正确的方向去,也许我可以用另一个版本替换编译器/链接器,或者以某种方式避免从源代码安装源代码?一般来说,只要有助于安装json gem并继续我的计划,任何解决方案都是受欢迎的.

非常感谢提前!

Cry*_*ggy 4

尝试 2.25 或 2.26 Binutils,因为您的 2.22 版本相当旧。