我根本无法在 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
。
我也遇到过这个错误。这就是我在 Ubuntu 15.04 和 Leiningen 2.5.2 中所做的。
~bin
目录中(如果不存在则创建它)。lein
文件的权限以使其可执行(chmod 755 ~/bin/lein)lein
.jar
更改为 .zip
,这样它就应该是 LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.zip"
leiningen-2.5.2-standalone.zip
放入 ~/.lein/self-installs
(不要解压 - 如果目录不存在则创建该目录 - 这是一个隐藏目录,在 Gnome Files 中,点击 Ctrl+H
即可查看)lein new MyFirstLeinProject
瞧。
我在 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
我遇到这个问题是因为我没有意识到我没有在 ubuntu 24.04 上安装curl。