2014-02-20 116 views
0

我正在开发一个需要therubyracer的项目。当我执行捆绑软件安装时,当捆绑器尝试安装therubyracer时,出现以下错误消息。在Fedora 20上安装TheRubyRacer gem错误

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /usr/bin/ruby extconf.rb 
checking for main() in -lpthread... yes 
checking for v8.h... yes 
creating Makefile 

make "DESTDIR=" 
g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -D_FILE_OFFSET_BITS=64 -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=i686 -mtune=atom -fasynchronous-unwind-tables -m32 -o init.o -c init.cc 
g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -D_FILE_OFFSET_BITS=64 -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=i686 -mtune=atom -fasynchronous-unwind-tables -m32 -o signature.o -c signature.cc 
g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -D_FILE_OFFSET_BITS=64 -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=i686 -mtune=atom -fasynchronous-unwind-tables -m32 -o exception.o -c exception.cc 
g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -D_FILE_OFFSET_BITS=64 -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=i686 -mtune=atom -fasynchronous-unwind-tables -m32 -o primitive.o -c primitive.cc 
g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -D_FILE_OFFSET_BITS=64 -Wall -g -rdynamic -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=i686 -mtune=atom -fasynchronous-unwind-tables -m32 -o context.o -c context.cc 
In file included from context.cc:1:0: 
context.cc: In static member function ‘static VALUE rr::Context::SetEmbedderData(VALUE, VALUE, VALUE)’: 
context.cc:81:23: error: ‘class v8::Context’ has no member named ‘SetEmbedderData’ 
    Void(Context(self)->SetEmbedderData(NUM2INT(index), Value(data))); 
        ^
rr.h:33:20: note: in definition of macro ‘Void’ 
#define Void(expr) expr; return Qnil; 
        ^
context.cc: In static member function ‘static VALUE rr::Context::GetEmbedderData(VALUE, VALUE)’: 
context.cc:85:23: error: ‘class v8::Context’ has no member named ‘GetEmbedderData’ 
    Void(Context(self)->GetEmbedderData(NUM2INT(index))); 
        ^
rr.h:33:20: note: in definition of macro ‘Void’ 
#define Void(expr) expr; return Qnil; 
        ^
make: *** [context.o] Error 1 


Gem files will remain installed in /home/anupam/.gem/ruby/gems/therubyracer-0.12.1 for inspection. 
Results logged to /home/anupam/.gem/ruby/gems/therubyracer-0.12.1/ext/v8/gem_make.out 
An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue. 
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling. 

当我运行gem install therubyracer -v'0.12.1'或没有版本时,仍然失败。

我是新来的红宝石,所以我真的不明白是怎么回事,或者为什么它失败。

任何帮助,这是非常感谢。

+0

尝试以下操作:'创业板安装therubyracer -v '0.12.1' - --with系统-V8 ' – MrYoshiji

+0

没有调试信息。 [anupam @ localhost therubyracer-0.12.1] $ gem install therubyracer -v'0.12.1' - --with-system-v8 构建本地扩展:'--with -system-V8' 这可能需要一段时间... 错误:错误安装therubyracer: \t错误:未能建立宝石原生扩展。 宝石文件仍将安装在/home/anupam/.gem/ruby/gems/therubyracer-0.12.1进行检查。 – anu

回答

0

我删除了所有的宝石。

卸载红宝石

重新安装红宝石红宝石-devel的

安装Ruby和Ruby-devel的安装therubyracer和libv8用yum不是宝石。

然后我跑捆绑安装和使用宝石百胜安装的已安装宝石。

感谢上帝Fedora的维护者!你们是真棒

-1

我知道这听起来很愚蠢的,但我有完全相同的问题,我似乎缺乏包gcc-C++。以为已经有了它们。 yum install gcc-c++的伎俩

1

我在Fedora 24的x64同样的问题和解决sudo dnf -y install gcc-c++我的问题