Closed dayja78 closed 8 years ago
Apologies: Looks like this is related to my employer's proxy. Even after tricking SDKMAN into installing, I couldn't do sdk list
, sdk install
, or anything without getting "PROXY DETECTED!" errors. I finally got sdk install
to work by finding internet access outside the office. But I have to say, this severely limits the usefulness of SDKMAN.
I have a suggestion: in doing my troubleshooting, I found that, just like with my original issue, curl api.sdkman.io/candidates/groovy
won't work behind the proxy, but curl https://api.sdkman.io/candidates/groovy
works fine. (Incidentally, both urls work fine in Chrome, even behind the proxy)
So: what about making SDKMAN use https all the time? Or an additional flag in .sdkman/etc/config to choose between http and https?
Or, can anybody out there tell me how to get curl to handle http requests through corporate proxies the same way Chrome does?? Google's doing nothing for me.
SDKMAN now performs all it's calls over https. Could you please let me know if this solved your problem and if so close this issue?
No response so closing this issue.
I am facing the same issue
Looking for a previous installation of SDKMAN... Looking for unzip... Looking for zip... which: no zip in (/c/Program Files/Java/jdk1.8.0_161/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Program Files/Java/jdk1.8.0_161/bin:/c/ProgramData/Oracle/Java/javapath:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/c/Program Files (x86)/Windows Live/Shared:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/d/AEM/Curl/src:/cmd:/c/Users/varun/AppData/Local/Microsoft/WindowsApps:/usr/bin/vendor_perl:/usr/bin/core_perl) Not found. Please install zip on your system using your favourite package manager.
Restart after installing zip.
@varun9715 nope, what you are seeing is vastly different. Please read what it says and follow the instructions.
@marc0der I have a very similar issue trying to run the installer behind a corporate proxy:
Looking for a previous installation of SDKMAN...
Looking for unzip...
Looking for zip...
Looking for curl...
Looking for sed...
Installing SDKMAN scripts...
Create distribution directories...
Getting available candidates...
Prime the config file...
Download script archive...
curl: (60) Peer's Certificate issuer is not recognized.
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
Downloaded zip archive corrupt. Are you connected to the internet?
If problem persists, please ask for help on https://gitter.im/sdkman/user-issues
I was able to fix the issue by adding '-k' option the the curl that downloads the zip:
echo "Download script archive..."
curl --location --progress-bar "${SDKMAN_SERVICE}/broker/download/sdkman/install/${SDKMAN_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"
echo "Download script archive..."
curl -k --location --progress-bar "${SDKMAN_SERVICE}/broker/download/sdkman/install/${SDKMAN_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"
Once that is fixed I then hit a secondary issue (again only behind a proxy):
> bash /root/.sdkman/bin/sdkman-init.sh
> yes | /bin/bash -l -c 'sdk install groovy'
WARNING: Cache is corrupt. SDKMAN can not be used until updated.
If I try to run sdk update
prior to the sdk install groovy
I get:
> sdk update
==== INTERNET NOT REACHABLE! ===================================================
Some functionality is disabled or only partially available.
If this persists, please enable the offline mode:
$ sdk offline
================================================================================
@varun9715 nope, what you are seeing is vastly different. Please read what it says and follow the instructions.
What "zip" program should be installed? I received the same error and installed a couple of "zip" programs but I'm still getting the error that says: " Please install zip on your system using your favourite package manager. Restart after installing zip."
steps to install SDKMAN on windows
Run windows Terminal in Admin rights. open git bash inside. (Ctrl + Shift + 4)
winget install -e --id GnuWin32.Zip
mkdir ~/bin
cp /usr/bin/unzip ~/bin/zip
curl -s "https://beta.sdkman.io" | bash
source "/c/Users/ajink/.sdkman/bin/sdkman-init.sh"
sdk selfupdate force
Done ! :)
@steelx The last step isn't required. SDKMAN is 100% up to date when you've just installed it.
I have a similar problem but it stops with: Looking for unzip... Not found.
Please install unzip using your favorite package manager Restart after installing unzip
-- How do I fix this?
I have a similar problem but it stops with: Looking for unzip... Not found.
Please install unzip using your favorite package manager Restart after installing unzip
-- How do I fix this?
What operating system are you using? SDKMAN! requires unzip
to work properly.
Hey, thanks for your response. I use Windows 10 and I fixed it. Now I have a problem with the next step typing "source "$HOME/.sdkman/bin/sdkman-init.sh" into my terminal. When type this command in my regular Windows terminal, it says that "source" is an invalid argument. When I type the command in the ubuntu terminal I get no response at all. Do you have any idea how to fix this? Thanks in advance!
I've fixed the problem on my Windows 11 environment simply by installing the zip
package: pacman -S zip
sdkman_install_error.txt res-4.0.37.zip_but_really_html.txt
curl -s "https://get.sdkman.io" | bash
is producing the attached error. The key part is quoted below. Looks like what's getting written to the res-4.0.37.zip file is actually some kind of html error page (also attached).Workaround:
After a bunch of screwing around, I wound up doing
curl -s "https://get.sdkman.io" > sdkman_installer.sh
, editing that script, and changingSDKMAN_SERVICE="http://api.sdkman.io"
toSDKMAN_SERVICE="https://api.sdkman.io"
. Running that modified script worked.This is what the original error message looks like: