1

我无法在 Ubuntu 12.04 中安装 therubyracer-heroku。我在互联网上的一两个其他地方看到过这个错误,但没有解决方案。我运行的命令是:

sudo gem install therubyracer-heroku -v '0.8.1.pre3'

输出很长,这些是最后几行(包含错误):

src/bootstrapper.cc: In static member function 'static bool v8::internal::Genesis::CompileScriptCached(v8::internal::Vector<const char>, v8::internal::Handle<v8::internal::String>, v8::internal::SourceCodeCache*, v8::Extension*, v8::internal::Handle<v8::internal::Context>, bool)':
src/bootstrapper.cc:1002:18: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
src/bootstrapper.cc: In member function 'bool v8::internal::Genesis::InstallNatives()':
src/bootstrapper.cc:1227:24: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
scons: *** [obj/release/bootstrapper.o] Error 1
scons: building terminated because of errors.
make: *** [build/v8/libv8.a] Error 2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby1.8
extconf.rb:9: Error compiling V8 (RuntimeError)

请帮忙!谢谢

4

1 回答 1

2

缺口,

therubyracer-heroku 和 therubyracer 版本 0.8.1 是古老的。请尝试使用最新版本的 therubyracer 的普通版本,当前版本为 0.11.3

gem install therubyracer

或者,如果您觉得必须坚持使用特定版本

gem install therubyracer -v 0.11.3
于 2013-01-22T05:37:16.620 回答