无法下载Leiningen独立Jar文件

5

我在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

你从哪里获取了lein脚本? - Diego Basch
我从页面 https://github.com/technomancy/leiningen 上的说明中获取了链接,如下所示:=> https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein - sakhunzai
你尝试按照错误信息所说的升级libssl了吗? - Diego Basch
我执行了 dist-upgrade 但是没有成功,我当前的系统版本是:Debian GNU/Linux 7.6 (wheezy) - sakhunzai
你有哪些版本的curl和wget? - Diego Basch
显示剩余3条评论
2个回答

2
我也遇到了这个错误。以下是我在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
完成。

感谢您提供详细的说明,可能您需要在GitHub上fork lein脚本 :) - sakhunzai

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接