问题描述
安装leiningen 时下载了leiningen的包,配置好环境变量后执行 lein self-install 出现如下错误:Downloading Leiningen to /usr/local/leing/self-installs/leiningen-2.0.0-SNAPSHOT-standalone.jar now...curl: (6) Couldn't resolve host 'github.com'Failed to download https://github.com/downloads/technomancy/leiningen/leiningen-2.0.0-SNAPSHOT-standalone.jarIt's possible your HTTP client's certificate store does not have thecorrect certificate authority needed. This is often caused by anout-of-date version of libssl. Either upgrade it or set HTTP_CLIENTto turn off certificate checks: export HTTP_CLIENT="wget --no-check-certificate -O" # or export HTTP_CLIENT="curl --insecure -f -L -o"See README.md for SNAPSHOT-specific build instructions.Error: Could not find or load main class clojure.main我在网址上没有找到leiningen-2.0.0-SNAPSHOT-standalone.jar这个包,那没有这个包应该再怎么安装呢?
解决方案
其中一种做法:你手动下载leiningen-2.0.0-SNAPSHOT-standalone.jar,然后手动安装jarMaven 安装 JAR 包的命令是:mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar例如:我下载的这个 jar 包是放到了 D:mvn 目录下(D:mvnspring-context-support-3.1.0.RELEASE.jar)那么我在 cmd 中敲入的命令就应该是:mvn install:install-file -Dfile=D:mvnspring-context-support-3.1.0.RELEASE.jar -DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar
解决方案二:
Failed to download https://github.com/downloads/technomancy/leiningen/leiningen-2.0.0-SNAPSHOT-standalone.jar 估计你下的版本比较老,还是SNAPSHOT版本下载最新的https://github.com/technomancy/leiningen 找Installation