Open hejfelix opened 6 days ago
Can reproduce this and i assume this reproduces on other Linux distros as well. It looks as the archive is corrupt and all binaries are kinda invalid (same size). Manually downloading the archive and extracting it also shows the non-executable binaries.
❯ tar xzf openjdk-18.0.2_linux-aarch64_bin.tar.gz
❯ lt 2 jdk-18.0.2
Permissions Size User Group Date Modified Name
drwxr-xr-x@ - roele staff 11 Sep 19:39 jdk-18.0.2
drwxr-xr-x@ - roele staff 11 Sep 19:39 ├── bin
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jar
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jarsigner
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── java
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── javac
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── javadoc
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── javap
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jcmd
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jconsole
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jdb
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jdeprscan
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jdeps
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jfr
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jhsdb
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jimage
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jinfo
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jlink
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jmap
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jmod
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jpackage
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jps
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jrunscript
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jshell
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jstack
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jstat
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jstatd
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── jwebserver
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── keytool
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ ├── rmiregistry
.rwxr-xr-x@ 71k roele staff 7 Jun 2022 │ └── serialver
drwxr-xr-x@ - roele staff 11 Sep 19:39 ├── conf
.rw-r--r--@ 2.7k roele staff 7 Jun 2022 │ ├── logging.properties
drwxr-xr-x@ - roele staff 11 Sep 19:39 │ ├── management
.rw-r--r--@ 6.6k roele staff 7 Jun 2022 │ ├── net.properties
drwxr-xr-x@ - roele staff 11 Sep 19:39 │ ├── sdp
drwxr-xr-x@ - roele staff 11 Sep 19:39 │ ├── security
.rw-r--r--@ 1.2k roele staff 7 Jun 2022 │ └── sound.properties
Red herrings. OpenJDK is build with glibc whereas Alpine has musl. You can try apk add gcompat
and it'll probably still fail, but at least it'll be clear that it wasn't an issue with the executable or tar or whatever.
Your best bet is to use a glibc-based distro instead of Alpine. Or you can use the Alpine OpenJDK port.
Thanks for the hint @jeremy. It seems that some vendors such as Azul provide musl builds but these are not automatically picked by mise
.
@hejfelix You can use one of the supported vendors. You can get a list of available Java versions for musl via mise ls-remote java | grep musl
for example mise install java@zulu-musl-18.32.11
seems to work fine.
Describe the bug Installing java fails with:
when running alpine inside a docker container
To Reproduce
Expected behavior Java should be installed
mise doctor
outputAdditional context While
doctor
complains that the shell is not activated, installing bash and running inside bash after activating yields the same result, so I don't think this is connected. I also tried to install the latest version fromedge
repo but same issue.