sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
6.08k stars 629 forks source link

Installing jdk with sdkman keeps reporting errors #1285

Open wxywizard opened 5 months ago

wxywizard commented 5 months ago

Question When I use rockylinux version 9 and use sdkman to install java, it reports the same error no matter what version is installed, I don't know why this problem occurs, and I am asking for the community's help, the specific error message and system version information is in the following screenshot.

In progress...

############################################################################################ 100.0% Download has failed, aborting!

Can not install java 21.0.2-graal at this time...

System info CleanShot 2024-04-08 at 15 36 15@2x

hgeraldino commented 5 months ago

Do you have tar installed? Can you run this with debug enabled? (on ~/.sdkman/etc/config, set sdkman_debug_mode=true)

Talbot3 commented 5 months ago

please remove downloaded package, redownload will be ok.

Talbot3 commented 5 months ago

i think this not check the package whether download complete .

Talbot3 commented 5 months ago

code just run install script, so failed.

rajinder-yadav commented 3 months ago

Also getting errors trying to install java, guess the download is incomplete. I was able to update maven without any problem.

$ sdk install java 22.0.1-tem

Downloading: java 22.0.1-tem

In progress...

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

Repackaging Java 22.0.1-tem...
/usr/bin/env: ‘zip’: No such file or directory

Done repackaging...
unzip:  cannot find or open /home/yadav/.sdkman/tmp/java-22.0.1-tem.zip, /home/yadav/.sdkman/tmp/java-22.0.1-tem.zip.zip or /home/yadav/.sdkman/tmp/java-22.0.1-tem.zip.ZIP.

Stop! The archive was corrupt and has been removed! Please try installing again.
[Sat Jun 22 21:17:38][yadav@source]:~
$ sdk list java
[Sat Jun 22 21:19:02][yadav@source]:~
$ sdk install java 22.0.1-oracle

Downloading: java 22.0.1-oracle

In progress...

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

Repackaging Java 22.0.1-oracle...
/usr/bin/env: ‘zip’: No such file or directory

Done repackaging...
unzip:  cannot find or open /home/yadav/.sdkman/tmp/java-22.0.1-oracle.zip, /home/yadav/.sdkman/tmp/java-22.0.1-oracle.zip.zip or /home/yadav/.sdkman/tmp/java-22.0.1-oracle.zip.ZIP.

Stop! The archive was corrupt and has been removed! Please try installing again.

Download folder

$ ls -l /home/yadav/.sdkman/tmp/
total 20
-rw-r--r-- 1 yadav yadav  931 Jun 22 21:19 hook_post_java_22.0.1-oracle.sh
-rw-r--r-- 1 yadav yadav  922 Jun 22 21:19 hook_post_java_22.0.1-tem.sh
-rw-r--r-- 1 yadav yadav  534 Jun 22 21:19 java-22.0.1-oracle.headers.tmp
-rw-r--r-- 1 yadav yadav 5157 Jun 22 21:19 java-22.0.1-tem.headers.tmp