我正在尝试在Debian6上安装therubyracer我在1.9.3使用rbenv当我开始做的时候,它抱怨libv8,所以我做了一个gem安装libv8现在,当我运行gem install therubyracer时,出现以下错误,说它找不到文件文件,它正在谈论,/rBeV/版本/ 1.93-p327/LIb/Ruby/GEMs/1.91/GEMS/LIVV83.1.113-3-X86Y64-Linux /Buff/V8/OUT/X64 .Relo/Obj.Trase/Toog/GYP/LIV88Base.A,但是确实存在。

hop@fev-temp:~$ gem install therubyracer
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

        /home/chop/.rbenv/versions/1.9.3-p327/bin/ruby extconf.rb
checking for main() in -lpthread... yes
creating Makefile

make
compiling stack.cc
compiling accessor.cc
compiling constants.cc
compiling heap.cc
compiling init.cc
compiling primitive.cc
compiling signature.cc
compiling date.cc
compiling locker.cc
compiling exception.cc
compiling gc.cc
compiling script.cc
compiling external.cc
compiling v8.cc
compiling object.cc
compiling trycatch.cc
compiling context.cc
compiling string.cc
compiling value.cc
compiling array.cc
compiling invocation.cc
compiling message.cc
compiling constraints.cc
compiling function.cc
compiling backref.cc
compiling handles.cc
compiling template.cc
compiling rr.cc
linking shared-object v8/init.so
/home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a: could not read symbols: No such file or directory
collect2: ld returned 1 exit status
make: *** [init.so] Error 1


Gem files will remain installed in /home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/therubyracer-0.11.0 for inspection.
Results logged to /home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/therubyracer-0.11.0/ext/v8/gem_make.out

最佳答案

我刚犯了同样的错误我在https://rubygems.org/gems/therubyracer上查看了gem的详细信息,似乎我们“幸运”地在发行日捆绑了一个新版本。
这似乎已经被报道:https://github.com/cowboyd/therubyracer/issues/215
所以,我想最简单的事情就是使用gem的最后一个版本所以我更新了我的Gemfile以指向最后一个版本,如下所示:

gem "therubyracer", "~> 0.10.2"

我成功地安装了宝石。
如果要手动安装gem,可以使用:
gem install therubyracer --version "~> 0.10.2"

关于ruby - 无法安装therubyracer,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13715902/

10-10 18:00