Installation of Leiningen 2.X in Mac OS X

与世无争的帅哥 提交于 2019-12-23 18:27:31

问题


I'm using leiningen ver 1.X, and I'm trying to update it to ver 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.

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.


回答1:


The ~/.m2/repositoryand ~/.m2/repository/org directories are root owned so that I couldn't get an access to create subdirectories beneath it. After changing the ownership, everything works fine. I guess I used root privilege when I excited 1.X version of leiningen.




回答2:


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


来源:https://stackoverflow.com/questions/11553813/installation-of-leiningen-2-x-in-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!