소프트웨어/Spring Boot

[sdkman] install, error solution (fail to download)

개발자_이훈규 2016. 7. 4. 17:51

현상)

Prime the config file...

Download script archive...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100   637  100   637    0     0    466      0  0:00:01  0:00:01 --:--:--   931

Download file : http://api.sdkman.io/res?platform=Linux&purpose=install

Extract script archive...

[/home/hklee/.sdkman/tmp/res-3.3.4.zip]

  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/hklee/.sdkman/tmp/res-3.3.4.zip or

        /home/hklee/.sdkman/tmp/res-3.3.4.zip.zip, and cannot find /home/hklee/.sdkman/tmp/res-3.3.4.zip.ZIP, period.

Install scripts...

mv: cannot stat '/home/hklee/.sdkman/tmp/stage/sdkman-init.sh': No such file or directory

mv: cannot stat '/home/hklee/.sdkman/tmp/stage/sdkman-*': No such file or directory

Set version to 3.3.4 ...

Attempt update of bash profiles...

Attempt update of zsh profiles...




All done!



Please open a new terminal, or run the following in the existing one:


    source "/home/hklee/.sdkman/bin/sdkman-init.sh"


Then issue the following command:


    sdk help


Enjoy!!!



증상)
tmp에 저장될 파일이 비어있다.(그래서 unzip을 하면 에러가 난다.)


해결방법)
sdkman의 zip파일을 제공하는 업체에서 sdkman download file을 수동으로 받아서 .sdkman/tmp 에 임의로 넣은 후, self update script의 일부를 고쳐서 self update를 실행시킨다.

해결 방법(자세히) )

installSdkman.sh

selfUpdateSdkman.sh


1. installSdkman.sh을 실행

2. https://bintray.com/sdkman/generic/sdkman-cli/5.0.0%2B51 여기서 download file을 .sdkman/tmp에 복사

3. selfUpdateSdkman.sh을 실행


그리고 새로운 terminal을 띄우면 sdk가 실행된다.


(selfupdate의 코드 중 curl을 이용해서 sdkman file을 주석처리하고 2번에서 다운받아 놓은 파일로 압축을 풀게 만들었다.)