无法安装json - Ubuntu 14.04 - Rails

Aiy*_*oyo 4 ruby json ruby-on-rails heroku

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
Run Code Online (Sandbox Code Playgroud)

嘿.我正试图推进到heroku但是用这个结束了.首先,有sqlit3问题.现在,当我输入bundle时,我无法安装json.我现在应该怎么做?

提前致谢.

Woj*_*ski 15

我有同样的问题.你需要安装libgmp-dev

运行sudo apt-get install libgmp-dev修复问题.