MinGw install SDKMAN

允我心安 提交于 2019-12-02 18:55:27

mingw 安装 curl zip unzip

curl

官网下载: https://curl.haxx.se/download.html

https://curl.haxx.se/windows/dl-7.64.0/curl-7.64.0-win64-mingw.zip

解压后 curl-7.64.0-win64-mingw\bin 添加到path环境变量

vim /etc/profile
export PATH="/d/code/env/curl-7.64.0-win64-mingw/bin:$PATH"
source /etc/profile

unzip zip

unzip zip安装就简单了

$ mingw-get.exe list | grep unzip
miniunzip.  Again, more sophisticated needs are met by the unzip and zip
as a belief that the zip and unzip packages are already minimal  enough.
by the unzip and zip packages.
miniunzip.  Again, more sophisticated needs are met by the unzip and zip
by the unzip and zip packages.
Package: msys-unzip                                      Subsystem: msys
mingw-get.exe install msys-unzip
mingw-get.exe install msys-zip

sdkman

官网安装方法: https://sdkman.io/install

$ curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

ok测试下

$ sdk install kotlin

Stop! java 11.0.2-open is not available. Possible causes:
 * 11.0.2-open is an invalid version
 * java binaries are incompatible with MINGW32_NT-6.1
 * java has not been released yet

结果报错 :( :( :( :(

sdkman不支持mingw,但支持cygwin. 看看有没有办法伪装成cygwin.

vim ~/.sdkman/bin/sdkman-init.sh

SDKMAN_PLATFORM=$(uname)

修改成

SDKMAN_PLATFORM=cygwin

重新执行下

source "$HOME/.sdkman/bin/sdkman-init.sh"

再次测试ok

sdk install kotlin

end ................

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!