Open jbuhacoff opened 7 years ago
Please see my pull request #519 for the changes.
Now I get output like this, which accurately describes what happened:
$ sdk install ant
Downloading: ant 1.9.7
In progress...
######################################################################## 100.0%
Failed to download ant from https://api.sdkman.io/2/broker/download/ant/1.9.7/cygwin_nt-10.0
Thanks for reporting this. Comments left in PR.
Hi, my issue seems related. On a fresh install of minimal ubuntu server 16.04 sdk install properly , sdk java install works, but when i did sdk install grails i got this.
machi@groovyMachi:~$ sdk install grails
Downloading: grails 3.2.11
In progress...
############ 17.5% curl: (56) GnuTLS recv error (-54): Error in the pull function. End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /home/machi/.sdkman/archives/grails-3.2.11.zip or /home/machi/.sdkman/archives/grails-3.2.11.zip.zip, and cannot find /home/machi/.sdkman/archives/grails-3.2.11.zip.ZIP, period.
Stop! The archive was corrupt and has been removed! Please try installing again. machi@groovyMachi:~$
Any workarounds? the whole sdk install grail is broken to me, it constantly timesout even i changes timers to be over 250 sec each
same issue here installing jetbrains java through sdkman when installing sdkman on gitbash i created a symbolic link named "zip.exe"my to 7zip using powershell (as admin privilege)
New-Item -ItemType SymbolicLink -Path "C:\Program Files\Git\mingw64\bin\zip.exe" -Target "C:\Program Files\7-Zip\7z.exe"
I tried
sdk install ant
and got this output:I looked up this message and found a number of old tickets about wrong version of zip. I'm using cygwin and I checked that I do have the zip and unzip packages from the archive category. I edited the sdkman-install.sh script to skip deleting the "corrupted" zip file and I found that what actually got downloaded was this:
I checked the download URL with curl and got this output:
So it appears the root cause of my issue is that the broker is redirecting to a URL that doesn't have the requested package, and the zip error is shown because what got downloaded from the server is some HTML instead of a zip file.
I made a couple of changes in sdkman-util.sh and sdkman-install.sh to detect the HTTP error and produce a more accurate message.