我正在尝试将JRuby(最好是版本1.7.13)安装到Raspberry Pi上。我安装了rbenv / ruby-build。当我尝试安装JRuby(1.7.13或1.7.11)时,我收到以下错误:
pi@raspberrypi:~$ rbenv install jruby-1.7.13
Downloading jruby-bin-1.7.13.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/faa1cd590f32f3cb92044d9abedf66ccea1d93a24236c877810c9b30e1e0577c
Installing jruby-1.7.13...
BUILD FAILED
Inspect or clean up the working tree at /tmp/ruby-build.20140713094726.2669
Results logged to /tmp/ruby-build.20140713094726.2669.log
Last 10 log lines:
jruby-1.7.13/tool/nailgun/Makefile.in
jruby-1.7.13/tool/nailgun/ng.exe
jruby-1.7.13/tool/nailgun/README.txt
jruby-1.7.13/tool/nailgun/src/c/ng.c
/tmp/ruby-build.20140713094726.2669/jruby-1.7.13 /tmp/ruby-build.20140713094726.2669 ~
ERROR: Loading command: install (LoadError)
Could not load FFI Provider: (NotImplementedError) FFI not available: null
See http://jira.codehaus.org/browse/JRUBY-4583
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
是否有可能在ARM上为Linux构建JFFI,我该怎么做呢?
答案 0 :(得分:1)
我相信答案是在Raspberry Pi上编译JFFI并将生成的libjffi-1.2.so复制到/ usr / lib。当我现在尝试使用rbenv安装JRuby 1.7.13时,我不再得到丢失的FFI错误但是"无法分配内存"错误。
我编写libjffi的过程是;
cd ~
pi@raspberrypi:~$ git clone git://github.com/jnr/jffi.git jffi.git
cd jffi.git
ant jar
sudo cp libjffi-1.2.so /usr/lib