WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Can't install JRuby

Open fuCtor opened this issue 10 years ago • 4 comments

I'm try to install JRuby over rbenv. But catch error on compile step.

Downloading jruby-bin-9.1.2.0.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/60598a465883ab4c933f805de4a7f280052bddc793b95735465619c03ca43f35
Installing jruby-9.1.2.0...

BUILD FAILED (Ubuntu 14.04 using ruby-build 20160602-23-g1a37ab1)

Inspect or clean up the working tree at /tmp/ruby-build.20161130162605.603
Results logged to /tmp/ruby-build.20161130162605.603.log

Last 10 log lines:
Building native extensions.  This could take a while...
ERROR:  Error installing jruby-launcher:
        ERROR: Failed to build gem native extension.

    current directory: /home/sv/.rbenv/versions/jruby-9.1.2.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.1-java
/home/sv/.rbenv/versions/jruby-9.1.2.0/bin/jruby -r ./siteconf20161130-665-1uxpvsg.rb extconf.rb
Cannot allocate memory - /home/sv/.rbenv/versions/jruby-9.1.2.0/bin/jruby -r ./siteconf20161130-665-1uxpvsg.rb extconf.rb 2>&1

Gem files will remain installed in /home/sv/.rbenv/versions/jruby-9.1.2.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.1-java for inspection.
Results logged to /home/sv/.rbenv/versions/jruby-9.1.2.0/lib/ruby/gems/shared/extensions/universal-java-1.7/2.3.0/jruby-launcher-1.1.1-java/gem_make.out

For install

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
export PATH="$HOME/.rbenv/bin:$PATH"
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
rbenv install jruby-9.1.2.0

fuCtor avatar Nov 30 '16 11:11 fuCtor

Can you manually increase your Windows pagefile size? Try 4GB minimum.

JasonLinMS avatar Dec 02 '16 01:12 JasonLinMS

memory state on install launching:

Mem:   6290548 total,  5268928 used,  1021620 free,    34032 buffers
Swap:  8265268 total,   698476 used,  7566792 free.   188576 cached Mem

With Java 7 installed successful, but with Java8 next error:

/tmp/ruby-build.20161202112213.3076/jruby-9.1.2.0 /tmp/ruby-build.20161202112213.3076 ~/develop
ERROR:  While executing gem ... (SocketError)
    initialize: name or service not known

Launch Bash as admin, same result:

BUILD FAILED (Ubuntu 14.04 using ruby-build 20160602-23-g1a37ab1)

Inspect or clean up the working tree at /tmp/ruby-build.20161202112553.70
Results logged to /tmp/ruby-build.20161202112553.70.log

Last 10 log lines:
Accept-Ranges: bytes
Server: AmazonS3
Age: 1509
X-Cache: Hit from cloudfront
Via: 1.1 b0c1028ac1da2bf7c9c2147888569a4f.cloudfront.net (CloudFront)
X-Amz-Cf-Id: aqgfdScJGVXofztOU6fLiuig_AdA4YS9rLR9NKacmX2BOip3EcAAJA==

/tmp/ruby-build.20161202112553.70/jruby-9.1.2.0 /tmp/ruby-build.20161202112553.70 ~
ERROR:  While executing gem ... (SocketError)
    initialize: name or service not known

fuCtor avatar Dec 02 '16 06:12 fuCtor

Thanks @fuCtor for reporting the issue. Can you please follow the issue template to report issues? It provides us much greater level of information to triage issues faster.

sunilmut avatar Dec 02 '16 23:12 sunilmut

Please try this on a newer version of WSL and re-open if you're still experiencing issues.

tara-raj avatar Jul 31 '18 20:07 tara-raj