简体   繁体   中英

Gem::Ext::BuildError: ERROR: Failed to build gem native extension, An error occurred while installing json (1.8.1)

I have cloned a repository from gitlab. And when I try to run

bundle install

it gives an error

Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 10.4.2
Using i18n 0.6.11
Installing json 1.8.1 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby -r ./siteconf20150904-16780-8gjzk0.rb extconf.rb --version
creating Makefile

make "DESTDIR=" clean
rm -f 
rm -f generator.so  *.o  *.bak mkmf.log .*.time

make "DESTDIR="
 *************some code************************
                ^
Makefile:238: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/crypsis/.gem/ruby/gems/json-1.8.1 for inspection.
Results logged to /home/crypsis/.gem/ruby/extensions/x86_64-linux/json-1.8.1/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

I tried with

bundle update and gem install bundler

still not working.If anyone faced similar problem please help me.

Try with installing cmake gem

sudo apt-get install cmake

对于Fedora ..

sudo yum install cmake

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