ruby - 无法在 JRuby 中安装 therubyracer

标签 ruby linux jruby rvm

我已经安装了 RVM,然后安装了 Jruby,这是我在输入时得到的版本:jruby -v:

jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (Java HotSpot(TM) Client VM 1.7.0_02) [linux-i386-java]

问题是我无法安装 therubyracer gem,当我尝试通过 jruby -S gem install therubyracer 安装时,我得到了这个:

/usr/local/rvm/rubies/jruby-1.6.5.1/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very we$
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
Checking for Python...Unable to build libv8: Python not found!
*** 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/local/rvm/rubies/jruby-1.6.5.1/bin/jruby

我也尝试过使用 --1.9 参数,强制使用另一个 ruby​​ 版本,但无论如何都失败了。即使我尝试安装 libv8,但我也遇到了上面同样的错误。

有什么想法吗? 我有 CentOS 5.7

最佳答案

你想要 Ruby Rhino .

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

相关文章:

linux - 为什么 du 给出不同的结果?

ruby - Rails lib 类未在生产中加载,在开发中工作正常

ruby - gem 安装 id3lib-ruby 期间缺少 libstdc++

ruby - 如何在 cucumber.feature 测试中嵌入 ruby​​ 变量

ruby - 带有 Ruby 的 XML 数据扫描器 : case statement or dynamic dispatch in term of performance?

ruby-on-rails - 测试 jRuby 的代码覆盖率

ruby - 为什么 jruby-openssl gem 有奇怪的文件夹结构?

css - Rails 3.2.x - 无法在本地主机上设置字体

c++ - 了解 vtu 文件大小

node.js - 从 node.js 更改终端的环境变量