I see something that resembles a C compiler error when I try installing ruby gem json 1.8.3
Here's the command I'm running:
gem install json -v '1.8.3'
And my output is:
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
I tried removing and installing packages binutils and build-essential but this did not fix the issue.
Some facts about my OS:
Debian GNU/Linux 7.9 (wheezy)
uname -a shows:
Linux Prometheus 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 2015 x86_64 GNU/Linux
I'm running this on an OpenVZ virtualized VPS host.
My /etc/apt/sources.list (if it helps):
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
Google produces zero relevant results for
BFD (GNU Binutils for Debian) 2.22 internal error, aborting at ../../bfd/reloc.c line 443 in bfd_get_reloc_size
If I can't "make" json gem because of linker error, please advise me into the right direction to go, maybe I can replace the compiler/linker with another version, or somehow circumvent installing things from source here? In general, any solution is welcome as soon as it helps install the json gem and proceed with my plan.
Big thanks in advance!