尝试捆绑安装,但失败并出现以下错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/.rvm/gems/ruby-1.9.3-p551@sp/gems/therubyracer-0.10.1/ext/v8
/home/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20161229-26285-j4qz96.rb extconf.rb
creating Makefile
current directory: /home/.rvm/gems/ruby-1.9.3-p551@sp/gems/therubyracer-0.10.1/ext/v8
make clean
current directory: /home/.rvm/gems/ruby-1.9.3-p551@sp/gems/therubyracer-0.10.1/ext/v8
make
compiling v8_script.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from v8_script.cpp:2:0:
v8_handle.h: In instantiation of ‘v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Script; VALUE = long unsigned int]’:
v8_script.cpp:25:56: required from here
v8_handle.h:43:10: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return (v8::Persistent<T>&)(rr_v8_handle_raw(value)->payload->handle);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiling v8_locker.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
v8_locker.cpp: In function ‘VALUE {anonymous}::Lock::Delete(VALUE)’:
v8_locker.cpp:45:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
compiling v8.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
compiling v8_try_catch.cpp
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
v8_try_catch.cpp: In function ‘v8::TryCatch* {anonymous}::unwrap(VALUE)’:
v8_try_catch.cpp:15:14: error: cannot convert ‘bool’ to ‘v8::TryCatch*’ in return
return false;
^~~~~
Makefile:198: recipe for target 'v8_try_catch.o' failed
make: *** [v8_try_catch.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/.rvm/gems/ruby-1.9.3-p551@sp/gems/therubyracer-0.10.1 for inspection.
Results logged to /home/.rvm/gems/ruby-1.9.3-p551@sp/extensions/x86-linux/1.9.1/therubyracer-0.10.1/gem_make.out
使用
- 导轨 3.2.6
- 红宝石 1.9.3
- Ubuntu 16.10
尝试安装libv8 -v=3.3.10 然后卸载它,也尝试安装新版本的libv8,仍然没有用。