简体   繁体   English

在Mac OS X中安装Leiningen 2.X.

[英]Installation of Leiningen 2.X in Mac OS X

I'm using leiningen ver 1.X, and I'm trying to update it to ver 2.X. 我正在使用leiningen ver 1.X,我正在尝试将其更新为2.X版。

As is written in this site , I downloaded the script as "lein2", but when I tried to run the "lein2" command, I get this error message. 正如在本网站上写的那样,我将脚本下载为“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

It seems that the server doesn't respond, but I'm not sure. 似乎服务器没有响应,但我不确定。 What might be wrong? 可能有什么问题? I use Mac OS X 10.7.4. 我使用的是Mac OS X 10.7.4。

The ~/.m2/repository and ~/.m2/repository/org directories are root owned so that I couldn't get an access to create subdirectories beneath it. ~/.m2/repository~/.m2/repository/org目录是root用户所有,因此我无法访问它下面的子目录。 After changing the ownership, everything works fine. 更改所有权后,一切正常。 I guess I used root privilege when I excited 1.X version of leiningen. 当我激动1.in版本的leiningen时,我想我使用了root权限。

brew has a formula for leiningen. 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM