ruby-on-rails – 安装json(1.8.3)时发生错误,Bundler无法继续.在Ubuntu上

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 安装json(1.8.3)时发生错误,Bundler无法继续.在Ubuntu上前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在ubuntu 14.04上安装json gem失败
使用本机扩展安装json 1.8.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/sumeruadmin/.rvm/rubies/ruby-2.2.3/bin/ruby -r./siteconf20150910-31195-1cx4b0u.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/sumeruadmin/.rvm/gems/ruby-2.2.3@global/gems/json-1.8.3 for inspection.
Results logged to /home/sumeruadmin/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out
An error occurred while installing json (1.8.3),and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

请指教
提前致谢.

解决方法

您缺少libgmp-dev库.
sudo apt-get install libgmp-dev
原文链接:https://www.f2er.com/ruby/267155.html

猜你在找的Ruby相关文章