Sdkman-cli: SDKMAN is able to install on Java on ARM

Created on 26 Apr 2018  Â·  7Comments  Â·  Source: sdkman/sdkman-cli

We require a conversation to take place in the appropriate Gitter Room before raising a new Github Issue. Please note that issues will be closed immediately if prior discussion did not take place. We need to do this to help manage the quality and validity of Issues raised on this project.

Please tick one:

Please explain the Issue / Feature Request here:

Currently, I am able to use sdkman and install java for the wrong architecture on a raspberry pi. It looks like it isn't doing some detection for the raspberry pi to prevent the install and is downloading an x86 64 bit version of java.

See error below:

pi@raspberrypi:~ $ sdk install java

Downloading: java 8.0.163-zulu

In progress...

######################################################################## 100.0%

Repackaging Java 8.0.163-zulu...

Done repackaging...

Installing: java 8.0.163-zulu
Done installing!

Do you want java 8.0.163-zulu to be set as default? (Y/n): Y

Setting java 8.0.163-zulu as default.
pi@raspberrypi:~ $ java -version
-bash: /home/pi/.sdkman/candidates/java/current/bin/java: cannot execute binary file: Exec format error
pi@raspberrypi:~ $ which java
/home/pi/.sdkman/candidates/java/current/bin/java
pi@raspberrypi:~ $ file
Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type]
            [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
       file -C [-m magicfiles]
       file [--help]
pi@raspberrypi:~ $ file /home/pi/.sdkman/candidates/java/current/bin/java
/home/pi/.sdkman/candidates/java/current/bin/java: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=f1ac5b47218b2ffcda98cb143d7f9fc431f3574e, not stripped

specific version of sdkman cli: 'SDKMAN 5.6.3+299'

Most helpful comment

Since we don't support the arm architecture, this will have wide reaching effects in in the sdkman-hooks project as well as in db migrations. But sure, feel free to raise PRs.

All 7 comments

I think the main problem here is that we are currently interpreting the output of uname incorrectly. Would you be able to share the output of uname on your pi please? We also don't have any Java versions available for ARM right now, but let's solve that after this is resolved.

@marc0der I intended to do that last night, I'll make sure to get that output for you when I get home this evening.

For uname -a: Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

For uname it just shows Linux

Bump for armv6 for Raspberry Pi Zero W.

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.71+ #1145 Fri Sep 21 15:06:38 BST 2018 armv6l GNU/Linux

@marc0der, would a pr help get this done sooner? If so I'd be happy to assist.

Since we don't support the arm architecture, this will have wide reaching effects in in the sdkman-hooks project as well as in db migrations. But sure, feel free to raise PRs.

Can't this issue be closed because of PR #769 ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hacpai picture hacpai  Â·  5Comments

aadrian picture aadrian  Â·  7Comments

andvgal picture andvgal  Â·  7Comments

cmoulliard picture cmoulliard  Â·  4Comments

EarthCitizen picture EarthCitizen  Â·  3Comments