我无法在 Arch Linux x64 中安装 therubyracer [英] I can't install therubyracer in Arch Linux x64

查看:53
本文介绍了我无法在 Arch Linux x64 中安装 therubyracer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试安装 therubyracer 时,出现以下错误:

When I try to install therubyracer, I get the following error:

Installing therubyracer (0.11.0) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

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

make
compiling script.cc
compiling v8.cc
compiling backref.cc
compiling value.cc
compiling accessor.cc
compiling trycatch.cc
compiling primitive.cc
compiling external.cc
compiling date.cc
compiling exception.cc
compiling init.cc
compiling template.cc
compiling message.cc
compiling stack.cc
compiling gc.cc
compiling string.cc
compiling handles.cc
compiling function.cc
compiling heap.cc
compiling invocation.cc
compiling locker.cc
compiling object.cc
compiling array.cc
compiling constants.cc
compiling rr.cc
compiling signature.cc
compiling constraints.cc
compiling context.cc
context.cc: In static member function ‘static VALUE rr::Context::SetData(VALUE, VALUE)’:
context.cc:81:3: error: no matching function for call to ‘v8::Context::SetData(rr::String)’
context.cc:81:3: note: candidate is:
In file included from rr.h:4:0,
                 from context.cc:1:
/usr/include/v8.h:3721:8: note: void v8::Context::SetData(v8::Handle<v8::Value>)
/usr/include/v8.h:3721:8: note:   no known conversion for argument 1 from ‘rr::String’ to ‘v8::Handle<v8::Value>’
make: *** [context.o] Error 1


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

我不知道发生了什么.

推荐答案

实际上,这有点棘手.

我使用我的自定义 dotfiles,所以,我有 ~/.dotfiles/bin 在我的路径中.

I use my custom dotfiles, so, I have ~/.dotfiles/bin in my PATH.

我还注意到该问题与 python v3 与 v2 相关.

所以,修复非常简单,不会破坏我的系统:

So, the fix was pretty easy, without break my system:

ln -s /usr/bin/python2 ~/.dotfiles/bin
reload
gem install libv8 --verbose
bundle

像这样离开我的Gemfile:

[...]
gem 'therubyracer', :require => 'v8', :platforms => :ruby
[...]

BOOM,它奏效了.

谢谢你们的帮助.抱歉延迟回复.

Thanks for your help guys. Sorry for the delay to reply.

干杯

问题已在较新的 therubyracer 版本 (0.11.1) 中得到修复.

Issue was fixed in the newer therubyracer release (0.11.1).

这篇关于我无法在 Arch Linux x64 中安装 therubyracer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆