简体   繁体   中英

An error occurred while installing json (1.8.3), and Bundler cannot continue. on Ubuntu

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.

Please advice Thanks in advance.

您缺少 libgmp-dev 库。

sudo apt-get install libgmp-dev

You might be missing libcurl3 library, an easy-to-use client-side URL transfer library. It worked for me

sudo apt-get install libcurl3-dev

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM