【问题标题】:Issue installing Leiningen on Mac在 Mac 上安装 Leiningen 时出现问题
【发布时间】:2015-04-23 09:52:33
【问题描述】:

我最近将我的 Mac 更新为 Yosemite。我安装了 Java SDK 版本 1.8.0

$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

然后我更新/升级了自制软件中的所有内容。 Leiningen 不工作,所以我卸载并重新安装它。

$ brew install leiningen
==> Downloading https://github.com/technomancy/leiningen/archive/2.5.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/leiningen-2.5.1.tar.gz
==> Downloading https://github.com/technomancy/leiningen/releases/download/2.5.1/leiningen-2.5.1-standalone.zip
Already downloaded: /Library/Caches/Homebrew/leiningen--jar-2.5.1.zip
==> Caveats
Dependencies will be installed to:
  $HOME/.m2/repository
To play around with Clojure run `lein repl` or `lein help`.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
????  /usr/local/Cellar/leiningen/2.5.1: 8 files, 15M, built in 2 seconds

当我再次尝试运行 Leiningen 时,我得到了同样的错误:

$ lein
(Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.pom from central)
(Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.jar from central)
(Could not find artifact cinder:cinder-nrepl:jar:0.8.1 in central (http://repo1.maven.org/maven2/))
(Could not find artifact cinder:cinder-nrepl:jar:0.8.1 in clojars (https://clojars.org/repo/))
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

我没有在我的家庭网络上使用代理或类似的东西。

我尝试降级到 Leiningen 的 2.4.2 版,并尝试从 leiningen.org 上的 bash 脚本安装它,但同样失败。

我该如何解决这个问题?

谢谢。 :)

【问题讨论】:

  • 正如@justncon 指出的那样,问题出在我的 ~/.lein/profiles.clj 中。 $ cat ~/.lein/profiles.clj {:user {:dependencies [[alembic "0.3.2"]] :plugins [[cinder/cinder-nrepl "0.8.1"]] :shorthand {. [alembic.still/distill alembic.still/lein]}}} 插件应该有 :plugins [[cider/cider-nrepl "0.8.1"]] 再次感谢@justncon!让我开心。

标签: macos clojure osx-yosemite leiningen


【解决方案1】:

在错误消息中它说它无法检索cinder:cinder-nrepl(应该是cider:cider-nrepl)依赖项。这很可能是由于您的 profiles.clj 文件之一(或 project.clj 文件,如果您在项目目录中运行 lein 命令)中的拼写错误。

此外,profiles.clj 文件可以在许多位置找到,并且它们的依赖关系图在某些情况下会合并在一起,请在此处查看更多信息:https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md

【讨论】:

  • 就是这样。正如您所指出的,问题出在插件部分的我的 ~/.lein/profiles.clj 文件中。非常感谢@justncon!
猜你喜欢
  • 2011-07-06
  • 2012-07-10
  • 1970-01-01
  • 2021-08-18
  • 1970-01-01
  • 2022-07-02
  • 2019-10-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多