2015-12-29 52 views
2

我已经搜索了很多解决方案,不幸的是,他们都没有解决。 这是我得到当我运行捆绑安装:无法在Ubuntu中安装therubyracer 14.04

Installing therubyracer 0.12.2 with native extensions 

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

    /home/louiecubero/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20151229-3880-cwrbql.rb extconf.rb 
checking for main() in -lpthread... yes 
creating Makefile 

make "DESTDIR=" clean 

make "DESTDIR=" 
compiling constants.cc 
make: g++: Command not found 
make: *** [constants.o] Error 127 

make failed, exit code 2 

Gem files will remain installed in /home/louiecubero/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection. 
Results logged to /home/louiecubero/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/therubyracer-0.12.2/gem_make.out 

我使用的红宝石版本是:

ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux] 

我的轨道版本:4.2.5钢轨

+2

你缺少g ++编译器。 'apt-get install build-essential'。 –

+0

它的工作!非常感谢你! :) –

回答

3

它的抱怨你还没有安装g ++。

我想你需要先做一个sudo apt-get install g++

+0

它的工作!非常感谢你! :) –

+0

这工作..谢谢你节省我的时间.. –