Unable to install json - Ubuntu 14.04 - Rails

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

    /home/user/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20150916-3216-1xudd6p.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1

make failed, exit code 2

Gem files will remain installed in /home/user/.rvm/gems/ruby-2.2.3/gems/json-1.8.3 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out

Hey. I'm trying to push the hero, but this is a dead end. Firstly, sqlit3 problem. Now I can not install json when I type bundle. What should I do now?

Thanks in advance.

+4
source share
1 answer

I had the same problem. You need to installlibgmp-dev

Run sudo apt-get install libgmp-devto fix the problem.

+15
source

Source: https://habr.com/ru/post/1607725/


All Articles