Gem :: Ext :: BuildError:错误:无法构建gem本机扩展,安装json时出错(1.8.1)

时间:2015-09-04 07:41:31

标签: ruby-on-rails ruby json bundle

我从gitlab克隆了一个存储库。当我尝试运行时

bundle install

它出错了

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.

我试过

捆绑更新 gem install bundler

仍然无法正常工作。如果有人遇到类似问题,请帮助我。

2 个答案:

答案 0 :(得分:2)

尝试安装cmake gem

sudo apt-get install cmake

答案 1 :(得分:0)

for Fedora ..

sudo yum install cmake