未能下载Leiningen独立jar文件

时间:2014-08-10 03:26:59

标签: clojure leiningen

我根本无法在Debian linux上安装leiningen:

> lein
Downloading Leiningen to /home/debianaut/.lein/self-installs/leiningen-2.4.3-standalone.jar now...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   355  100   355    0     0    240      0  0:00:01  0:00:01 --:--:--   375
100 14.2M  100 14.2M    0     0  51565      0  0:04:48  0:04:48 --:--:-- 41059
Failed to download https://github.com/technomancy/leiningen/releases/download/2.4.3/leiningen-2.4.3-standalone.jar
It's possible your HTTP client's certificate store does not have the
correct certificate authority needed. This is often caused by an
out-of-date version of libssl. Either upgrade it or set HTTP_CLIENT
to turn off certificate checks:
  export HTTP_CLIENT="wget --no-check-certificate -O" # or
  export HTTP_CLIENT="curl --insecure -f -L -o"
It's also possible that you're behind a firewall haven't yet
set HTTP_PROXY and HTTPS_PROXY.

我尝试设置HTTP_CLIENT但仍然是同样的错误。我从lein脚本中读取的版本是2.4.3

2 个答案:

答案 0 :(得分:1)

我也遇到过这个错误。这就是我在Ubuntu 15.04中使用Leiningen 2.5.2所做的。

  1. lein文件保存到~bin目录中(如果该目录不存在则创建它)。
  2. 更改lein文件的权限以使其可执行(chmod 755~ / bin / lein)
  3. 使用文本编辑器打开lein
  4. 在第116行,将.jar更改为.zip,以便LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.zip"
  5. GitHub下载Leiningen 2.5.2。
  6. 将zip文件leiningen-2.5.2-standalone.zip放入~/.lein/self-installs(不要解压缩 - 如果目录不存在则创建目录 - 这是一个隐藏目录,在Gnome Files中,点击Ctrl+H到看到它)
  7. 启动您的第一个项目:lein new MyFirstLeinProject
  8. 瞧。

答案 1 :(得分:0)

我在Mac OS X 10.8.5(Mountain Lion)上使用leiningen 2.1.3时遇到了同样的问题。该脚本试图下载https://leiningen.s3.amazonaws.com/downloads/leiningen-2.1.3-standalone.jar

最终我回到了leiningen.org并从https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein

获取了当前的lein脚本

效果很好。下载的资源是:https://github.com/technomancy/leiningen/releases/download/2.5.1/leiningen-2.5.1-standalone.zip