git bash安装SDKman遇到需要安装zip的问题

问题如下

$ curl -s "https://get.sdkman.io" | bash

                                -+syyyyyyys:
                            `/yho:`       -yd.
                         `/yh/`             +m.
                       .oho.                 hy                          .`
                     .sh/`                   :N`                `-/o`  `+dyyo:.
                   .yh:`                     `M-          `-/osysoym  :hs` `-+sys:      hhyssssssssy+
                 .sh:`                       `N:          ms/-``  yy.yh-      -hy.    `.N-````````+N.
               `od/`                         `N-       -/oM-      ddd+`     `sd:     hNNm        -N:
              :do`                           .M.       dMMM-     `ms.      /d+`    `NMMs       `do
            .yy-                             :N`    ```mMMM.      -      -hy.      /MMM:       yh
          `+d+`           `:/oo/`       `-/osyh/ossssssdNMM`           .sh:        yMMN`      /m.
         -dh-           :ymNMMMMy  `-/shmNm-`:N/-.``   `.sN            /N-        `NMMy      .m/
       `oNs`          -hysosmMMMMydmNmds+-.:ohm           :             sd`       :MMM/      yy
      .hN+           /d:    -MMMmhs/-.`   .MMMh   .ss+-                 `yy`      sMMN`     :N.
     :mN/           `N/     `o/-`         :MMMo   +MMMN-         .`      `ds      mMMh      do
    /NN/            `N+....--:/+oooosooo+:sMMM:   hMMMM:        `my       .m+    -MMM+     :N.
   /NMo              -+ooooo+/:-....`...:+hNMN.  `NMMMd`        .MM/       -m:   oMMN.     hs
  -NMd`                                    :mm   -MMMm- .s/     -MMm.       /m-  mMMd     -N.
 `mMM/                                      .-   /MMh. -dMo     -MMMy        od. .MMMs..---yh
 +MMM.                                           sNo`.sNMM+     :MMMM/        sh`+MMMNmNm+++-
 mMMM-                                           /--ohmMMM+     :MMMMm.       `hyymmmdddo
 MMMMh.                  `````-+yy/`yMMM/     :MMMMMy       -sm:.``..-:-.`
 dMMMMmo-.``````..-:/osyhddddho.           `+shdh+.   hMMM:     :MmMMMM/   ./yy/` `:sys+/+sh/
 .dMMMMMMmdddddmmNMMMNNNNNMMMMMs           sNdo-      dMMM-  `-/yd/MMMMm-:sy+.  :hs-      /N`
  `/ymNNNNNNNmmdys+/::----/dMMm:          +m-         mMMM+ohmo/.` sMMMMdo-    .om:       `sh
     `.-----+/.`       `.-+hh/`         `od.          NMMNmds/     `mmy:`     +mMy      `:yy.
           /moyso+//+ossso:.           .yy`          `dy+:`         ..       :MMMN+---/oys:
         /+m:  `.-:::-`               /d+                                    +MMMMMMMNh:`
        +MN/                        -yh.                                     `+hddhy+.
       /MM+                       .sh:
      :NMo                      -sh/
     -NMs                    `/yy:
    .NMy                  `:sh+.
   `mMm`               ./yds-
  `dMMMmyo:-.````.-:oymNy:`
  +NMMMMMMMMMMMMMMMMms:`
    -+shmNMMMNmdy+:`


                                                                 Now attemptinginstallation...


Looking for a previous installation of SDKMAN...
Looking for unzip...
Looking for zip...
which: no zip in (/c/Users/mengxianzhu/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/mengxianzhu/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/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/WINDOWS/System32/OpenSSH:/c/Program Files/PuTTY:/c/Program Files (x86)/MATLAB/MATLAB Compiler Runtime/v714/runtime/win32:/c/Program Files/MATLAB/R2018a/runtime/win64:/c/Program Files/MATLAB/R2018a/bin:/cmd:/c/Program Files/TortoiseGit/bin:/c/Program Files/Microsoft Windows Performance Toolkit:/c/Users/mengxianzhu/AppData/Local/Android/Sdk/tools:/c/Users/mengxianzhu/AppData/Local/Android/Sdk/platform-tools:/c/Users/mengxianzhu/AppData/Local/Android/Sdk/tools/bin:/c/Program Files/Java/jdk1.8.0_201/bin:/c/Program Files/Java/jdk1.8.0_201/jre/bin:/c/Users/mengxianzhu/AppData/Local/Microsoft/WindowsApps:/c/Users/mengxianzhu/AppData/Local/Programs/MicrosoftVS Code/bin:/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.
======================================================================================================

解决办法

参考链接 http://leetschau.github.io/install-sdkman-on-windows-git-bash.html

SDKMan需要zip,默认情况下Windows Git Bash中不包含zip。要解决这个问题,请转到https://sourceforge.net/projects/gnuwin32/files/,并在列表中找到zip。下载zip-3.0-bin.zip并在bin文件夹中解压缩zip.exe。复制到c:\程序文件\Git\usr\bin。再次运行SDKMan install脚本。

再次安装

$ curl -s "https://get.sdkman.io" | bash

                                -+syyyyyyys:
                            `/yho:`       -yd.
                         `/yh/`             +m.
                       .oho.                 hy                          .`
                     .sh/`                   :N`                `-/o`  `+dyyo:.
                   .yh:`                     `M-          `-/osysoym  :hs` `-+sys:      hhyssssssssy+
                 .sh:`                       `N:          ms/-``  yy.yh-      -hy.    `.N-````````+N.
               `od/`                         `N-       -/oM-      ddd+`     `sd:     hNNm        -N:
              :do`                           .M.       dMMM-     `ms.      /d+`     `NMMs       `do
            .yy-                             :N`    ```mMMM.      -      -hy.       /MMM:       yh
          `+d+`           `:/oo/`       `-/osyh/ossssssdNMM`           .sh:         yMMN`      /m.
         -dh-           :ymNMMMMy  `-/shmNm-`:N/-.``   `.sN            /N-         `NMMy      .m/
       `oNs`          -hysosmMMMMydmNmds+-.:ohm           :             sd`        :MMM/      yy
      .hN+           /d:    -MMMmhs/-.`   .MMMh   .ss+-                 `yy`       sMMN`     :N.
     :mN/           `N/     `o/-`         :MMMo   +MMMN-         .`      `ds       mMMh      do
    /NN/            `N+....--:/+oooosooo+:sMMM:   hMMMM:        `my       .m+     -MMM+     :N.    /NMo              -+ooooo+/:-....`...:+hNMN.  `NMMMd`        .MM/       -m:    oMMN.     hs   -NMd`                  :mm   -MMMm- .s/     -MMm.       /m-   mMMd     -N.  `mMM/             .-   /MMh. -dMo     -MMMy        od. .MMMs..---yh  +MMM.               sNo`.sNMM+     :MMMM/        sh`+MMMNmNm+++-  mMMM-                    /--ohmMMM+     :MMMMm.       `hyymmmdddo  MMMMh.                  `````-+yy/`yMMM/     :MMMMMy       -sm:.``..-:-.`  dMMMMmo-.``````..-:/osyhddddho.           `+shdh+.   hMMM:     :MmMMMM/   ./yy/` `:sys+/+sh/  .dMMMMMMmdddddmmNMMMNNNNNMMMMMs         sNdo-      dMMM-  `-/yd/MMMMm-:sy+.   :hs-      /N`   `/ymNNNNNNNmmdys+/::----/dMMm:          +m-         mMMM+ohmo/.` sMMMMdo-    .om:       `sh
     `.-----+/.`       `.-+hh/`         `od.          NMMNmds/     `mmy:`     +mMy      `:yy.
           /moyso+//+ossso:.           .yy`          `dy+:`         ..       :MMMN+---/oys:
         /+m:  `.-:::-`               /d+                                    +MMMMMMMNh:`
        +MN/                        -yh.                                     `+hddhy+.
       /MM+                       .sh:
      :NMo                      -sh/
     -NMs                    `/yy:
    .NMy                  `:sh+.    `mMm`               ./yds-   `dMMMmyo:-.````.-:oymNy:`   +NMMMMMMMMMMMMMMMMms:`
    -+shmNMMMNmdy+:`


                                                                 Now attempting installation...


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...
######################################################################## 100.0% Extract script archive... Install scripts... Set version to 5.7.3+337 ... Attempt update of interactive bash profile on regular UNIX... Added sdkman init snippet to /c/Users/mengxianzhu/.bashrc Attempt update of zsh profile... Updated existing /c/Users/mengxianzhu/.zshrc



All done!


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

    source "/c/Users/mengxianzhu/.sdkman/bin/sdkman-init.sh"

Then issue the following command:

    sdk help

Enjoy!!!

参考链接

你可能感兴趣的:(Java,git,git,bash)