【问题标题】:Installation of Leiningen 2.X in Mac OS X在 Mac OS X 中安装 Leiningen 2.X
【发布时间】:2012-07-19 04:09:29
【问题描述】:

我正在使用 leiningen 版本 1.X,我正在尝试将其更新到版本 2.X。

正如this site 中所写,我将脚本下载为“lein2”,但是当我尝试运行“lein2”命令时,收到此错误消息。

Could not find artifact lein-newnew:lein-newnew:pom:0.3.4 in central (http://repo1.maven.org/maven2)
Could not transfer artifact lein-newnew:lein-newnew:pom:0.3.4 from/to clojars (https://clojars.org/repo/): Specified destination directory cannot be created: /Users/smcho/.m2/repository/lein-newnew/lein-newnew/0.3.4
Exception in thread "main" org.sonatype.aether.resolution.DependencyResolutionException: Failed to collect dependencies for [#<Dependency lein-newnew:lein-newnew:jar:0.3.4 (compile)>]
    at ...
    ... 4 more

似乎服务器没有响应,但我不确定。可能有什么问题?我使用 Mac OS X 10.7.4。

【问题讨论】:

  • 错误信息的其余部分是什么?对 Lein 来说,查看几个 repos 并不罕见。
  • 您的$HOME/.m2/settings.xml 中是否配置了镜像?如果是这样,他们可以干涉。对此进行测试的一种方法是将此文件暂时移动到其他位置并再次尝试lein2 self-install
  • @georgek:我添加了错误消息的其余部分。
  • @ivant:我没有 $HOME/.m2/settings.xml。
  • 您认为这可能是什么原因: 原因:org.apache.maven.wagon.TransferFailedException:无法创建指定的目标目录:/Users/smcho/.m2/repository/lein -newnew/lein-newnew/0.3.4

标签: clojure installation leiningen


【解决方案1】:

~/.m2/repository~/.m2/repository/org 目录是 root 拥有的,因此我无法访问在其下创建子目录。更改所有权后,一切正常。我想我在兴奋 1.X 版本的 leiningen 时使用了 root 权限。

【讨论】:

    【解决方案2】:

    brew 有一个 leiningen 的公式。

    > brew update
    > brew install leiningen
    > lein -v
    Leiningen 2.5.3 on Java 1.8.0_45 Java HotSpot(TM) 64-Bit Server VM
    

    【讨论】:

      猜你喜欢
      • 2014-05-12
      • 1970-01-01
      • 2015-08-24
      • 2014-04-24
      • 2011-02-21
      • 2011-07-28
      • 2017-01-16
      • 2013-11-09
      • 1970-01-01
      相关资源
      最近更新 更多