本文介绍了安装json(1.8.3)时出错,Bundler无法继续.在 Ubuntu 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 ubuntu 14.04 上安装 json gem 失败使用本机扩展安装 json 1.8.3

Installing json gem failing on ubuntu 14.04 Installing json 1.8.3 with native extensions

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 库.

You are missing a libgmp-dev library.

sudo apt-get install libgmp-dev

这篇关于安装json(1.8.3)时出错,Bundler无法继续.在 Ubuntu 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 20:46